submissions

This commit is contained in:
Виталий Лавшонок
2025-11-02 23:41:23 +03:00
parent 235b2c16bd
commit f6c681c038
26 changed files with 589 additions and 298 deletions

View File

@@ -5,11 +5,12 @@ import Register from "../views/home/auth/Register";
import Menu from "../views/home/menu/Menu";
import { useAppDispatch, useAppSelector } from "../redux/hooks";
import { useEffect } from "react";
import { fetchWhoAmI } from "../redux/slices/auth";
import { fetchWhoAmI, logout } from "../redux/slices/auth";
import Missions from "../views/home/missions/Missions";
import Articles from "../views/home/articles/Articles";
import Groups from "../views/home/groups/Groups";
import Contests from "../views/home/contests/Contests";
import { PrimaryButton } from "../components/button/PrimaryButton";
const Home = () => {
const name = useAppSelector((state) => state.auth.username);
@@ -35,7 +36,7 @@ const Home = () => {
<Route path="articles/*" element={<Articles/>} />
<Route path="groups/*" element={<Groups/>} />
<Route path="contests/*" element={<Contests/>} />
<Route path="*" element={name} />
<Route path="*" element={<>{name}<PrimaryButton onClick={() => {dispatch(logout())}}>выйти</PrimaryButton></>} />
</Routes>
</div>
{