From f87dd9c30a73eb6ff8d9f9ecf6f560ade9c4e4a2 Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Tue, 10 Oct 2023 16:48:02 +0200 Subject: [PATCH] Do not show anything in create patron app if anonymous The hosting application/site should handle this situation --- .../create-patron-user-info/CreatePatron.entry.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/apps/create-patron-user-info/CreatePatron.entry.tsx b/src/apps/create-patron-user-info/CreatePatron.entry.tsx index 571dff5b7d..76c4f8332d 100644 --- a/src/apps/create-patron-user-info/CreatePatron.entry.tsx +++ b/src/apps/create-patron-user-info/CreatePatron.entry.tsx @@ -52,17 +52,12 @@ export interface CreatePatronProps const CreatePatronEntry: FC = () => { const userToken = hasToken("user") ? getToken("user") : null; + // The application using this app should handle the case where the user is not logged in. + // Eg by returning 403 Forbidden or redirecting to the login page. if (!userToken) { - return ( - <> -

Please Log ind..

-

- When the flash message/info bar has been implemented, we will use it - here to tell the user to log in. -

- - ); + return null; } + return ; };