From 07e9ad920437e40f8a30930f90d970f06bd2c4fc Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Fri, 6 Oct 2023 20:59:51 +0200 Subject: [PATCH] Add check if user token is set If the user token is not set the user should be asked to log in. --- .../create-patron-user-info/CreatePatron.entry.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/apps/create-patron-user-info/CreatePatron.entry.tsx b/src/apps/create-patron-user-info/CreatePatron.entry.tsx index bccc2d157d..ba2d1ca652 100644 --- a/src/apps/create-patron-user-info/CreatePatron.entry.tsx +++ b/src/apps/create-patron-user-info/CreatePatron.entry.tsx @@ -47,10 +47,21 @@ export interface CreatePatronProps extends CreatePatronConfigProps, CreatePatronUrlProps, CreatePatronTextProps { - userToken: string; + userToken?: string; } const CreatePatronEntry: FC = ({ userToken }) => { + 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 ; };