This commit is contained in:
Виталий Лавшонок
2025-10-28 23:37:26 +03:00
parent 11c41985c7
commit 34a404f147
5 changed files with 168 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import { useAppDispatch, useAppSelector } from "../redux/hooks";
import { useEffect } from "react";
import { fetchWhoAmI } from "../redux/slices/auth";
import Problems from "../views/home/problems/Problems";
import Articles from "../views/home/articles/Articles";
const Home = () => {
const name = useAppSelector((state) => state.auth.username);
@@ -19,7 +20,7 @@ const Home = () => {
return (
<div className="w-full bg-liquid-background grid grid-cols-[250px,1fr] divide-x-[1px] divide-liquid-lighter">
<div className="w-full bg-liquid-background grid grid-cols-[250px,1fr,250px] divide-x-[1px] divide-liquid-lighter">
<div className="min-h-screen">
<Menu />
</div>
@@ -29,10 +30,15 @@ const Home = () => {
<Route path="account" element={<Login />} />
<Route path="register" element={<Register />} />
<Route path="problems/*" element={<Problems/>} />
<Route path="articles/*" element={<Articles/>} />
<Route path="*" element={name} />
</Routes>
</div>
{
<Routes>
<Route path="articles/*" element={<div></div>} />
</Routes>
}
</div>
);
};