Проект разделен на два репозитория
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Outlet, useLocation } from 'react-router';
|
||||
import { Header } from '../components/Header';
|
||||
|
||||
export function Root() {
|
||||
const location = useLocation();
|
||||
const isChat = location.pathname.startsWith('/chat/');
|
||||
const isAuth = location.pathname.startsWith('/auth/');
|
||||
|
||||
return (
|
||||
<div className="size-full flex flex-col bg-background">
|
||||
<div className="w-full max-w-[390px] mx-auto h-full flex flex-col">
|
||||
{/* Хедер скрываем на чате и экранах авторизации */}
|
||||
{!isChat && !isAuth && <Header />}
|
||||
|
||||
<Outlet />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user