account and protected router

This commit is contained in:
Виталий Лавшонок
2025-11-05 00:08:51 +03:00
parent 994954c817
commit aeab03d35c
14 changed files with 173 additions and 85 deletions

View File

@@ -0,0 +1,42 @@
import { Route, Routes } from 'react-router-dom';
import AccountMenu from './AccoutMenu';
import RightPanel from './RightPanel';
import MissionsBlock from './MissionsBlock';
import ContestsBlock from './ContestsBlock';
import ArticlesBlock from './ArticlesBlock';
const Account = () => {
return (
<div className="h-full w-[calc(100%+250px)] box-border grid grid-cols-[1fr,520px] relative">
<div className=" h-full min-h-0 flex flex-col">
<div className=" h-full grid grid-rows-[80px,1fr] ">
<div className="">
<AccountMenu />
</div>
<div className="h-full min-h-0 overflow-y-scroll medium-scrollbar flex flex-col gap-[20px] ">
<Routes>
<Route
path="/home/account/missions"
element={<MissionsBlock />}
/>
<Route
path="/home/account/articles"
element={<ArticlesBlock />}
/>
<Route
path="/home/account/contests"
element={<ContestsBlock />}
/>
<Route path="*" element={<MissionsBlock />} />
</Routes>
</div>
</div>
</div>
<div className=" h-full min-h-0">
<RightPanel />
</div>
</div>
);
};
export default Account;