diff --git a/src/constants/paths.ts b/src/constants/paths.ts index 32a478e..ae68bc9 100644 --- a/src/constants/paths.ts +++ b/src/constants/paths.ts @@ -21,8 +21,10 @@ export const SUB_PATH = { LEADERBOARD: 'leaderboard', SUBMISSON: 'submission', - PROBLEM: ':problemId', + PROBLEM: 'all-problems/:problemId', PROBLEM_CREATE: ':contestId/create', + PROBLEM_EDIT_LIST: ':contestId/edit', + PROBLEM_EDIT: ':contestId/edit/:problemId', ALL_PROBLEMS: 'all-problems', ALL_CLASSES: 'all-classes', ANNOUNCEMENTS: 'announcements', @@ -33,6 +35,7 @@ export const SUB_PATH = { CONTEST: 'contest', CONTEST_DETAIL: ':contestId', CONTEST_PROBLEM: ':contestId/:contestProblemId', + CONTEST_PROBLEM_EDIT: ':contestId/:problemId/edit', CONTEST_LIST_EDIT: 'edit', }; diff --git a/src/pages/Class/hooks/useClassProblemListTable.tsx b/src/pages/Class/hooks/useClassProblemListTable.tsx index db2ae36..0506f5b 100644 --- a/src/pages/Class/hooks/useClassProblemListTable.tsx +++ b/src/pages/Class/hooks/useClassProblemListTable.tsx @@ -57,7 +57,7 @@ export const useClassProblemListTable = (keyword: string) => { e: React.MouseEvent, id: number | string ) => { - navigate(`../${id}`); + navigate(`${id}`); }; return {