"use client"; import { useAuth } from "@/lib/contexts/auth"; import { Typography, Stack } from "@mui/material"; import WithAuthMiddleware from "@/core/middlewares/withAuth"; import LoadingHardPage from "@/core/components/LoadingHardPage"; const Layout = ({ children }) => { const { isAuth, initAuthState, errorState } = useAuth(); if (!initAuthState && !isAuth) return ( {errorState.message} کد : {errorState.status} ) : ( درحال احراز هویت... ) } loading={true} /> ); return {children}; }; export default Layout;