diff --git a/frontend/src/components/group/GroupCreateBox.tsx b/frontend/src/components/group/GroupCreateBox.tsx index ddd7223..f8bce44 100644 --- a/frontend/src/components/group/GroupCreateBox.tsx +++ b/frontend/src/components/group/GroupCreateBox.tsx @@ -59,6 +59,11 @@ export function GroupCreateBox({viewSet}: GroupCreateBoxProps): JSX.Element | nu [viewSet, name, slug, description, members, access], ) + const canCreate = + React.useMemo( + () => name.validity === true && access.validity === true && Boolean(authorization?.state.user?.username), + [name, access, authorization], + ) if(!authorization?.state.token) { return null @@ -72,11 +77,11 @@ export function GroupCreateBox({viewSet}: GroupCreateBoxProps): JSX.Element | nu
- - 0 ? true : undefined}/> + + 0 ? true : undefined}/> - + - + Create