Updating group name works again.
This commit is contained in:
parent
e4d7d0a232
commit
8aaca848b2
|
@ -3,7 +3,7 @@ import clsx from 'clsx'
|
||||||
import { PencilIcon } from '@heroicons/react/outline'
|
import { PencilIcon } from '@heroicons/react/outline'
|
||||||
|
|
||||||
import { Group } from 'common/group'
|
import { Group } from 'common/group'
|
||||||
import { deleteGroup, joinGroup } from 'web/lib/firebase/groups'
|
import { deleteGroup, joinGroup, updateGroup } from 'web/lib/firebase/groups'
|
||||||
import { Spacer } from '../layout/spacer'
|
import { Spacer } from '../layout/spacer'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { Modal } from 'web/components/layout/modal'
|
import { Modal } from 'web/components/layout/modal'
|
||||||
|
@ -31,6 +31,7 @@ export function EditGroupButton(props: { group: Group; className?: string }) {
|
||||||
setIsSubmitting(true)
|
setIsSubmitting(true)
|
||||||
|
|
||||||
await Promise.all(addMemberUsers.map((user) => joinGroup(group, user.id)))
|
await Promise.all(addMemberUsers.map((user) => joinGroup(group, user.id)))
|
||||||
|
await updateGroup(group, { name })
|
||||||
|
|
||||||
setIsSubmitting(false)
|
setIsSubmitting(false)
|
||||||
updateOpen(false)
|
updateOpen(false)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user