From 0fecf52a3979c66838be2bf3089d7d805711cd5f Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Fri, 13 Oct 2023 09:45:38 +0200 Subject: [PATCH] Refactor menuLogOutUrl to logoutUrl The urls are in general considered to be global and in this case it is a url that is needed in different apps/contexts --- src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx | 4 ++-- src/apps/menu/menu.dev.tsx | 2 +- src/apps/menu/menu.entry.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx b/src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx index 12adb3a25b..927aee48ae 100644 --- a/src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx +++ b/src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx @@ -64,7 +64,7 @@ const MenuLoggedInContent: FC = ({ pageSize }) => { const [loansSoonOverdue, setLoansSoonOverdue] = useState(0); const [reservationsReadyForPickup, setReservationsReadyForPickup] = useState(0); - const { menuViewYourProfileTextUrl, menuLogOutUrl } = useUrls(); + const { menuViewYourProfileTextUrl, logoutUrl } = useUrls(); // Set user data useEffect(() => { @@ -171,7 +171,7 @@ const MenuLoggedInContent: FC = ({ pageSize }) => {
{t("menuLogOutText")} diff --git a/src/apps/menu/menu.dev.tsx b/src/apps/menu/menu.dev.tsx index c112278358..157d7b9d06 100644 --- a/src/apps/menu/menu.dev.tsx +++ b/src/apps/menu/menu.dev.tsx @@ -124,7 +124,7 @@ export default { defaultValue: "Profile links", control: { type: "text" } }, - menuLogOutUrl: { + logoutUrl: { defaultValue: "/Logout", control: { type: "text" } }, diff --git a/src/apps/menu/menu.entry.tsx b/src/apps/menu/menu.entry.tsx index c510b9635b..1f229c65bd 100644 --- a/src/apps/menu/menu.entry.tsx +++ b/src/apps/menu/menu.entry.tsx @@ -28,7 +28,7 @@ export interface MenuProps { menuLogOutText: string; loansSoonOverdueText: string; loansOverdueText: string; - menuLogOutUrl: string; + logoutUrl: string; thresholdConfig: string; feeListDaysText: string; menuLoginText: string;