Skip to content

Commit

Permalink
Add check if user token is set
Browse files Browse the repository at this point in the history
If the user token is not set the user should be asked to log in.
  • Loading branch information
spaceo committed Oct 6, 2023
1 parent 7a69b06 commit 07e9ad9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/apps/create-patron-user-info/CreatePatron.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,21 @@ export interface CreatePatronProps
extends CreatePatronConfigProps,
CreatePatronUrlProps,
CreatePatronTextProps {
userToken: string;
userToken?: string;
}

const CreatePatronEntry: FC<CreatePatronProps> = ({ userToken }) => {
if (!userToken) {
return (
<>
<h2>Please Log ind..</h2>
<p>
When the flash message/info bar has been implemented, we will use it
here to tell the user to log in.
</p>
</>
);
}
return <CreatePatron userToken={userToken} />;
};

Expand Down

0 comments on commit 07e9ad9

Please sign in to comment.