Add attempts

This commit is contained in:
Виталий Лавшонок
2025-12-03 13:33:59 +03:00
parent 95f7479375
commit 8f337e6f7b
9 changed files with 6971 additions and 6794 deletions

View File

@@ -4,7 +4,7 @@ import { cn } from '../../../lib/cn';
import { useAppDispatch, useAppSelector } from '../../../redux/hooks';
import ContestsBlock from './ContestsBlock';
import { setMenuActivePage } from '../../../redux/slices/store';
import { fetchContests } from '../../../redux/slices/contests';
import { fetchContests, fetchMyContests, fetchParticipatingContests } from '../../../redux/slices/contests';
import ModalCreateContest from './ModalCreate';
import Filters from './Filter';
@@ -23,10 +23,13 @@ const Contests = () => {
);
const error = useAppSelector((state) => state.contests.fetchContests.error);
// При загрузке страницы — выставляем активную вкладку и подгружаем контесты
useEffect(() => {
dispatch(setMenuActivePage('contests'));
dispatch(fetchContests({}));
dispatch(fetchParticipatingContests({pageSize:100}));
dispatch(fetchMyContests());
}, []);
return (