mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
groups: fix metadata editing for groups
This commit is contained in:
parent
def755cbee
commit
dcce7fffaf
@ -20,6 +20,9 @@ import { StatelessAsyncButton } from "~/views/components/StatelessAsyncButton";
|
|||||||
import { ColorInput } from "~/views/components/ColorInput";
|
import { ColorInput } from "~/views/components/ColorInput";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
|
|
||||||
|
import { uxToHex } from '~/logic/lib/util';
|
||||||
|
|
||||||
|
|
||||||
interface FormSchema {
|
interface FormSchema {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
@ -57,10 +60,11 @@ export function GroupSettings(props: GroupSettingsProps) {
|
|||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const { title, description, color, isPrivate } = values;
|
const { title, description, color, isPrivate } = values;
|
||||||
|
const uxColor = uxToHex(color);
|
||||||
await props.api.metadata.update(props.association, {
|
await props.api.metadata.update(props.association, {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
color,
|
color: uxColor
|
||||||
});
|
});
|
||||||
if (isPrivate !== currentPrivate) {
|
if (isPrivate !== currentPrivate) {
|
||||||
const resource = resourceFromPath(props.association["group-path"]);
|
const resource = resourceFromPath(props.association["group-path"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user