add contests
This commit is contained in:
@@ -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]">
|
||||
|
||||
Reference in New Issue
Block a user