diff --git a/components/ActionBar/Publications.tsx b/components/ActionBar/Publications.tsx index 484c358e..4a9a28a7 100644 --- a/components/ActionBar/Publications.tsx +++ b/components/ActionBar/Publications.tsx @@ -23,7 +23,9 @@ export const PublicationButtons = (props: { currentPubUri: string | undefined; }) => { let { identity } = useIdentityData(); - let looseleaves = ["placeholder"]; + let looseleaves = identity?.permission_token_on_homepage.find( + (f) => f.permission_tokens.leaflets_to_documents, + ); // don't show pub list button if not logged in or no pub list // we show a "start a pub" banner instead @@ -32,7 +34,7 @@ export const PublicationButtons = (props: { return (
- {looseleaves.length > 0 && ( + {looseleaves && ( <>