From b388ee399f62141f98b3c2e86498de71df9de7bf Mon Sep 17 00:00:00 2001 From: Joao Correia Date: Thu, 20 Feb 2025 12:12:00 +0000 Subject: [PATCH] small refactor --- src/pages/approval-workflows/[id]/index.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/pages/approval-workflows/[id]/index.tsx b/src/pages/approval-workflows/[id]/index.tsx index dfbedc0f..4048df94 100644 --- a/src/pages/approval-workflows/[id]/index.tsx +++ b/src/pages/approval-workflows/[id]/index.tsx @@ -260,10 +260,7 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor if (examModule && examId) { const exam = await getExamById(examModule, examId.trim()); if (!exam) { - toast.error( - "Something went wrong while fetching exam!", - { toastId: "invalid-exam-id" } - ); + toast.error("Something went wrong while fetching exam!"); setViewExamIsLoading(false); return; } @@ -272,13 +269,6 @@ export default function Home({ user, initialWorkflow, id, workflowAssignees, wor payload: { exams: [exam], modules: [examModule] }, }); router.push("/exam"); - } else { - toast.error( - "Something went wrong while fetching exam!", - { toastId: "invalid-exam-id" } - ); - setViewExamIsLoading(false); - return; } }