From 66c013398edd4d303bd9a8608d18c083860347ba Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 24 Nov 2025 18:30:30 -0500 Subject: [PATCH] don't show looseleafs tab if none --- components/ActionBar/Publications.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 && ( <>