import { useNavigate, useOutletContext } from "react-router"; import { Button } from "@components/Button"; import { GridCard } from "@components/Card"; import LogoBlue from "@assets/logo-blue.svg"; import LogoWhite from "@assets/logo-white.svg"; import { m } from "@localizations/messages"; interface ContextType { setupPeerConnection: () => Promise; } /* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */ export default function OtherSessionRoute() { const outletContext = useOutletContext(); const navigate = useNavigate(); // Function to handle closing the modal const handleClose = () => { outletContext?.setupPeerConnection().then(() => navigate("..")); }; return (

{m.other_session_detected()}

{m.other_session_take_over()}

); }