From afac999b3df713cb7065bd1e09d3993d005ceaa1 Mon Sep 17 00:00:00 2001 From: John Angel Date: Tue, 17 Sep 2024 19:49:49 +0200 Subject: [PATCH] feat: Open zoom meetings in a new tab --- src/modals/AdHocMeetingModal.tsx | 4 ++-- src/modals/ZoomMeetingModal.tsx | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modals/AdHocMeetingModal.tsx b/src/modals/AdHocMeetingModal.tsx index a36139d09..776c8daa8 100644 --- a/src/modals/AdHocMeetingModal.tsx +++ b/src/modals/AdHocMeetingModal.tsx @@ -53,7 +53,7 @@ const AdHocMeetingModal = ({ isOpen, onOpenChange, matchId }: ModalProps) => { setIsBrowserMeeting(true); const response = await createMeeting(); if (response) { - navigate(`/video-chat/${response.appointmentId}/${response.appointmentType}`); + window.open(`/video-chat/${response.appointmentId}/${response.appointmentType}`); } }; @@ -63,7 +63,7 @@ const AdHocMeetingModal = ({ isOpen, onOpenChange, matchId }: ModalProps) => { if (response.zoomUrl) { window.open(response.zoomUrl, '_self'); } else { - navigate(`/video-chat/${response.appointmentId}/${response.appointmentType}`); + window.open(`/video-chat/${response.appointmentId}/${response.appointmentType}`); } }; diff --git a/src/modals/ZoomMeetingModal.tsx b/src/modals/ZoomMeetingModal.tsx index d02642c63..da927672f 100644 --- a/src/modals/ZoomMeetingModal.tsx +++ b/src/modals/ZoomMeetingModal.tsx @@ -1,6 +1,5 @@ import { Trans, useTranslation } from 'react-i18next'; import { Lecture_Appointmenttype_Enum } from '../gql/graphql'; -import { useNavigate } from 'react-router-dom'; import CheckBadge from '../assets/icons/check-badge.svg'; import CameraIcon from '../assets/icons/camera-icon.svg'; import { BaseModalProps, Modal, ModalFooter, ModalHeader, ModalTitle } from '@/components/Modal'; @@ -50,7 +49,10 @@ export const ZoomInfoOptions = () => { const ZoomMeetingModal: React.FC = ({ isOpen, onOpenChange, appointmentId, appointmentType, zoomUrl }) => { const { t } = useTranslation(); - const navigate = useNavigate(); + + const handleOnContinueInBrowser = () => { + window.open(`/video-chat/${appointmentId}/${appointmentType}`); + }; return ( @@ -61,7 +63,7 @@ const ZoomMeetingModal: React.FC = ({ isOpen, onOpenChang -