add contests

This commit is contained in:
Виталий Лавшонок
2025-12-05 23:42:18 +03:00
parent 358c7def78
commit fd34761745
36 changed files with 2518 additions and 710 deletions

View File

@@ -11,6 +11,7 @@ import { useAppDispatch, useAppSelector } from '../../../redux/hooks';
import { PrimaryButton } from '../../../components/button/PrimaryButton';
import { useNavigate } from 'react-router-dom';
import { arrowLeft } from '../../../assets/icons/header';
import { useQuery } from '../../../hooks/useQuery';
export interface Article {
id: number;
@@ -25,6 +26,10 @@ interface ContestMissionsProps {
const ContestMissions: FC<ContestMissionsProps> = ({ contest }) => {
const navigate = useNavigate();
const dispatch = useAppDispatch();
const query = useQuery();
const url = query.get('back') ?? '/home/contests';
const { status } = useAppSelector(
(state) => state.contests.fetchMySubmissions,
);
@@ -113,7 +118,7 @@ const ContestMissions: FC<ContestMissionsProps> = ({ contest }) => {
src={arrowLeft}
className="cursor-pointer"
onClick={() => {
navigate(`/home/contests`);
navigate(url);
}}
/>
<span className="text-liquid-light font-bold text-[18px]">