Add ability to change participant's name (#577)

This commit is contained in:
Luke Vella 2023-03-17 19:00:14 +00:00 committed by GitHub
parent 05d2c7b1d0
commit cb52adab01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 406 additions and 261 deletions

View file

@ -25,3 +25,12 @@ export const useModal = (
);
return [modal, () => setVisible(true), () => setVisible(false)];
};
export const useModalState = (): [boolean, () => void, () => void] => {
const [visible, setVisible] = React.useState(false);
const hide = React.useCallback(() => setVisible(false), []);
const show = React.useCallback(() => setVisible(true), []);
return [visible, show, hide];
};