From d1cd9bdf751ff1ddda364eb04ef84074d2e22d24 Mon Sep 17 00:00:00 2001 From: Aykhan Ahmadli Date: Thu, 21 Nov 2024 15:43:36 +0100 Subject: [PATCH] Revert "Revert "End call redirect issue"" --- packages/telemed-intake/app/src/components/VideoControls.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/telemed-intake/app/src/components/VideoControls.tsx b/packages/telemed-intake/app/src/components/VideoControls.tsx index 10d94a7a..95a07443 100644 --- a/packages/telemed-intake/app/src/components/VideoControls.tsx +++ b/packages/telemed-intake/app/src/components/VideoControls.tsx @@ -11,10 +11,13 @@ import { CallSettingsTooltip } from './CallSettingsTooltip'; import { useVideoCallStore } from '../features/video-call'; import { otherColors } from '../IntakeThemeProvider'; import { CallSettings } from './CallSettingsDialog'; +import { useNavigate } from 'react-router-dom'; +import { IntakeFlowPageRoute } from 'src/App'; export const VideoControls: FC = () => { const { toggleVideo, isVideoEnabled } = useLocalVideo(); const { muted, toggleMute } = useToggleLocalMute(); + const navigate = useNavigate(); const meetingManager = useMeetingManager(); const [isSettingsOpen, setIsSettingsOpen] = useState(false); @@ -46,6 +49,7 @@ export const VideoControls: FC = () => { const disconnect = async (): Promise => { await cleanup(); useVideoCallStore.setState({ meetingData: null }); + navigate(IntakeFlowPageRoute.PatientPortal.path); }; return (