diff --git a/apps/learneth/src/components/BackButton/index.tsx b/apps/learneth/src/components/BackButton/index.tsx index 14f8112d4f..63b8c39975 100644 --- a/apps/learneth/src/components/BackButton/index.tsx +++ b/apps/learneth/src/components/BackButton/index.tsx @@ -10,6 +10,8 @@ function BackButton({entity}: any) { const isDetailPage = location.pathname === '/detail' const queryParams = new URLSearchParams(location.search) const stepId = Number(queryParams.get('stepId')) + const nextStep = entity && entity.steps[stepId + 1] + const previousStep = entity && entity.steps[stepId - 1] return (