From 57899a39dc7ae129bb73d33052480b7daa6cdc63 Mon Sep 17 00:00:00 2001 From: celine Date: Wed, 3 Dec 2025 15:20:10 -0500 Subject: [PATCH] fixed the hasLooseleaf check, some style tweaks to the new doc more options dropdown --- .../home/Actions/CreateNewButton.tsx | 26 +++++++++++-------- components/ActionBar/Publications.tsx | 4 +-- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/(home-pages)/home/Actions/CreateNewButton.tsx b/app/(home-pages)/home/Actions/CreateNewButton.tsx index 8d2203be..9b4b2ed9 100644 --- a/app/(home-pages)/home/Actions/CreateNewButton.tsx +++ b/app/(home-pages)/home/Actions/CreateNewButton.tsx @@ -68,9 +68,9 @@ export const CreateNewMoreOptionsButton = (props: {}) => { /> } > -
New Leaflet
+
New Leaflet
{ let id = await createNewLeaflet({ pageType: "doc", @@ -88,7 +88,7 @@ export const CreateNewMoreOptionsButton = (props: {}) => { { let id = await createNewLeaflet({ pageType: "canvas", @@ -105,8 +105,18 @@ export const CreateNewMoreOptionsButton = (props: {}) => { -
New Draft
- +
+
New Draft
+ {}}> + +
+ Looseleaf +
+ A one off post on AT Proto +
+
+
+
{identity?.publications.map((pub) => { let router = useRouter(); return ( @@ -124,12 +134,6 @@ export const CreateNewMoreOptionsButton = (props: {}) => { ); })} - -
- {}}> - - Looseleaf - ); }; diff --git a/components/ActionBar/Publications.tsx b/components/ActionBar/Publications.tsx index f8f5abfc..e6465cb2 100644 --- a/components/ActionBar/Publications.tsx +++ b/components/ActionBar/Publications.tsx @@ -23,8 +23,8 @@ export const PublicationButtons = (props: { currentPubUri: string | undefined; }) => { let { identity } = useIdentityData(); - let hasLooseleafs = !!identity?.permission_token_on_homepage.find( - (f) => f.permission_tokens.leaflets_to_documents, + let hasLooseleafs = identity?.permission_token_on_homepage.find( + (f) => f.permission_tokens.leaflets_to_documents[0], ); console.log(hasLooseleafs); -- 2.51.2