import Menu from "@/components/menu"; import { useAppContext } from "@/providers/AuthProvider"; import { FunctionComponent } from "preact"; import { lazy, Route, Router, useLocation } from "preact-iso"; import ids from "./profile.module.scss"; const ProfilePage: FunctionComponent = () => { const { route } = useLocation(); const { isLoggedIn, isCheckingAuth } = useAppContext(); // Получаем новый сигнал if (isCheckingAuth.value) { return
Redirecting...
; // Заглушка на время редиректа } return isLoggedIn.value ? (Redirecting...
); }; export default ProfilePage;