From 71cbf2bfae4424b3e89531a1661e874a2f3406a8 Mon Sep 17 00:00:00 2001 From: olav Date: Wed, 23 Mar 2022 10:44:43 +0100 Subject: [PATCH] refactor: make refresh work on fogot password page (#808) --- frontend/src/component/menu/routes.js | 7 ++++--- .../src/component/providers/SWRProvider/SWRProvider.tsx | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/menu/routes.js b/frontend/src/component/menu/routes.js index bd96b0533c..a3406f36c1 100644 --- a/frontend/src/component/menu/routes.js +++ b/frontend/src/component/menu/routes.js @@ -456,8 +456,8 @@ export const routes = [ type: 'protected', menu: {}, }, - /* If you update this route path, make sure you update the path in SWRProvider.tsx */ + /* If you update this route path, make sure you update the path in SWRProvider.tsx */ { path: '/login', title: 'Log in', @@ -478,15 +478,16 @@ export const routes = [ /* If you update this route path, make sure you update the path in SWRProvider.tsx */ { path: '/reset-password', - title: 'reset-password', + title: 'Reset password', hidden: true, component: ResetPassword, type: 'unprotected', menu: {}, }, + /* If you update this route path, make sure you update the path in SWRProvider.tsx */ { path: '/forgotten-password', - title: 'reset-password', + title: 'Forgotten password', hidden: true, component: ForgottenPassword, type: 'unprotected', diff --git a/frontend/src/component/providers/SWRProvider/SWRProvider.tsx b/frontend/src/component/providers/SWRProvider/SWRProvider.tsx index a922ed7acf..f7fb820a17 100644 --- a/frontend/src/component/providers/SWRProvider/SWRProvider.tsx +++ b/frontend/src/component/providers/SWRProvider/SWRProvider.tsx @@ -32,7 +32,8 @@ const SWRProvider: React.FC = ({ if ( path === formatApiPath('login') || path === formatApiPath('new-user') || - path === formatApiPath('reset-password') + path === formatApiPath('reset-password') || + path === formatApiPath('forgotten-password') ) { return; }