From 57a87a83371137ef12c493c0b4079ee4ad1d3a2b Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 8 Jul 2024 14:07:10 +0200 Subject: [PATCH 1/6] matomo in learneth --- .../src/components/BackButton/index.tsx | 11 +++-- .../src/components/RepoImporter/index.tsx | 6 ++- apps/learneth/src/pages/Home/index.tsx | 2 +- apps/learneth/src/pages/StepDetail/index.tsx | 6 ++- apps/learneth/src/pages/StepList/index.tsx | 2 +- apps/learneth/src/redux/models/remixide.ts | 41 +++++++++++++------ apps/learneth/src/redux/models/workshop.ts | 4 +- 7 files changed, 49 insertions(+), 23 deletions(-) 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 (