Fix close button on join call modal

It just errored as we didn't pass onClose through to the modal
This commit is contained in:
David Baker 2022-11-04 17:56:37 +00:00
parent cafac39733
commit 509fd65156

View file

@ -25,7 +25,7 @@ import styles from "./JoinExistingCallModal.module.css";
interface Props { interface Props {
onJoin: (e: PressEvent) => void; onJoin: (e: PressEvent) => void;
onClose: (e: PressEvent) => void; onClose: () => void;
// TODO: add used parameters for <Modal> // TODO: add used parameters for <Modal>
[index: string]: unknown; [index: string]: unknown;
} }
@ -33,7 +33,12 @@ export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Modal title={t("Join existing call?")} isDismissable {...rest}> <Modal
title={t("Join existing call?")}
isDismissable
{...rest}
onClose={onClose}
>
<ModalContent> <ModalContent>
<p>{t("This call already exists, would you like to join?")}</p> <p>{t("This call already exists, would you like to join?")}</p>
<FieldRow rightAlign className={styles.buttons}> <FieldRow rightAlign className={styles.buttons}>