Add edit nickname to contact modal for group members

This commit is contained in:
Jamie Kyle 2024-03-27 17:32:47 -07:00 committed by GitHub
parent cf02337d6d
commit 2fbbcdf358
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 53 additions and 1 deletions

View file

@ -14,6 +14,7 @@ import type {
import { Input } from './Input';
import { AutoSizeTextArea } from './AutoSizeTextArea';
import { Button, ButtonVariant } from './Button';
import { strictAssert } from '../util/assert';
const formSchema = z.object({
nickname: z
@ -43,6 +44,11 @@ export function EditNicknameAndNoteModal({
onSave,
onClose,
}: EditNicknameAndNoteModalProps): JSX.Element {
strictAssert(
conversation.type === 'direct',
'Expected a direct conversation'
);
const [givenName, setGivenName] = useState(
conversation.nicknameGivenName ?? ''
);