From 32e72a881763c31a38ac0cc8a66e50e72ca4479c Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Tue, 19 Dec 2023 11:34:15 +0000 Subject: [PATCH] Update subscription routes and components --- StatusPage/src/App.tsx | 14 +++++++------- .../{Unsubscribe.tsx => UpdateSubscription.tsx} | 0 StatusPage/src/Utils/PageMap.ts | 4 ++-- StatusPage/src/Utils/RouteMap.ts | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) rename StatusPage/src/Pages/Subscribe/{Unsubscribe.tsx => UpdateSubscription.tsx} (100%) diff --git a/StatusPage/src/App.tsx b/StatusPage/src/App.tsx index 5c6610a805..cee2c4db88 100644 --- a/StatusPage/src/App.tsx +++ b/StatusPage/src/App.tsx @@ -36,7 +36,7 @@ import ObjectID from 'Common/Types/ObjectID'; // Logout. import Logout from './Pages/Accounts/Logout'; import StatusPageUtil from './Utils/StatusPage'; -import Unsubscribe from './Pages/Subscribe/Unsubscribe'; +import UpdateSubscription from './Pages/Subscribe/UpdateSubscription'; const App: () => JSX.Element = () => { Navigation.setNavigateHook(useNavigate()); @@ -370,10 +370,10 @@ const App: () => JSX.Element = () => { { onPageLoadComplete(); }} @@ -428,17 +428,17 @@ const App: () => JSX.Element = () => { { onPageLoadComplete(); }} pageRoute={ RouteMap[ - PageMap.PREVIEW_UNSUBSCRIBE + PageMap.PREVIEW_UPDATE_SUBSCRIPTION ] as Route } allowSubscribersToChooseResources={ diff --git a/StatusPage/src/Pages/Subscribe/Unsubscribe.tsx b/StatusPage/src/Pages/Subscribe/UpdateSubscription.tsx similarity index 100% rename from StatusPage/src/Pages/Subscribe/Unsubscribe.tsx rename to StatusPage/src/Pages/Subscribe/UpdateSubscription.tsx diff --git a/StatusPage/src/Utils/PageMap.ts b/StatusPage/src/Utils/PageMap.ts index 98ba439ad8..28491f3016 100644 --- a/StatusPage/src/Utils/PageMap.ts +++ b/StatusPage/src/Utils/PageMap.ts @@ -12,7 +12,7 @@ enum PageMap { SUBSCRIBE_EMAIL = 'SUBSCRIBE_EMAIL', SUBSCRIBE_SMS = 'SUBSCRIBE_SMS', SUBSCRIBE_WEBHOOKS = 'SUBSCRIBE_WEBHOOKS', - UNSUBSCRIBE = 'UNSUBSCRIBE', + UPDATE_SUBSCRIPTION = 'UPDATE_SUBSCRIPTION', NOT_FOUND = 'NOT_FOUND', @@ -28,7 +28,7 @@ enum PageMap { PREVIEW_SUBSCRIBE_EMAIL = 'PREVIEW_SUBSCRIBE_EMAIL', PREVIEW_SUBSCRIBE_SMS = 'PREVIEW_SUBSCRIBE_SMS', PREVIEW_SUBSCRIBE_WEBHOOKS = 'PREVIEW_SUBSCRIBE_WEBHOOKS', - PREVIEW_UNSUBSCRIBE = 'PREVIEW_UNSUBSCRIBE', + PREVIEW_UPDATE_SUBSCRIPTION = 'PREVIEW_UPDATE_SUBSCRIPTION', // Accounts. LOGIN = 'LOGIN', diff --git a/StatusPage/src/Utils/RouteMap.ts b/StatusPage/src/Utils/RouteMap.ts index 53498ca90d..2527a9c1cb 100644 --- a/StatusPage/src/Utils/RouteMap.ts +++ b/StatusPage/src/Utils/RouteMap.ts @@ -17,7 +17,7 @@ const RouteMap: Dictionary = { [PageMap.SUBSCRIBE_EMAIL]: new Route(`/subscribe/email`), [PageMap.SUBSCRIBE_SMS]: new Route(`/subscribe/sms`), [PageMap.SUBSCRIBE_WEBHOOKS]: new Route(`/subscribe/webhooks`), - [PageMap.UNSUBSCRIBE]: new Route(`/unsubscribe/:id`), + [PageMap.UPDATE_SUBSCRIPTION]: new Route(`/update-subscription/:id`), [PageMap.LOGIN]: new Route(`/login`), [PageMap.SSO]: new Route(`/sso`), @@ -82,8 +82,8 @@ const RouteMap: Dictionary = { `/status-page/${RouteParams.StatusPageId}/logout` ), - [PageMap.PREVIEW_UNSUBSCRIBE]: new Route( - `/status-page/${RouteParams.StatusPageId}/unsubscribe/:id` + [PageMap.PREVIEW_UPDATE_SUBSCRIPTION]: new Route( + `/status-page/${RouteParams.StatusPageId}/update-subscription/:id` ), };