From 9c9192e27cb14d1376e621eea5e99d7491fb72c1 Mon Sep 17 00:00:00 2001 From: celine Date: Fri, 10 Oct 2025 16:51:27 -0400 Subject: [PATCH] moved discover from reader header to nav sidebar --- actions/getIdentityData.ts | 2 +- components/ActionBar/Navigation.tsx | 38 +++++++++++++++++------------ 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/actions/getIdentityData.ts b/actions/getIdentityData.ts index b2968f8a..17d62de2 100644 --- a/actions/getIdentityData.ts +++ b/actions/getIdentityData.ts @@ -16,7 +16,7 @@ export async function getIdentityData() { identities( *, bsky_profiles(*), - subscribers_to_publications(*), + publication_subscriptions(*), custom_domains!custom_domains_identity_id_fkey(publication_domains(*), *), home_leaflet:permission_tokens!identities_home_page_fkey(*, permission_token_rights(*)), permission_token_on_homepage( diff --git a/components/ActionBar/Navigation.tsx b/components/ActionBar/Navigation.tsx index 6818bebb..fa71c8c9 100644 --- a/components/ActionBar/Navigation.tsx +++ b/components/ActionBar/Navigation.tsx @@ -18,8 +18,6 @@ export const DesktopNavigation = (props: { currentPage: navPages; publication?: string; }) => { - let unreadNotifications = true; - return (
@@ -90,10 +88,16 @@ const NavigationOptions = (props: { let thisPublication = identity?.publications?.find( (pub) => pub.uri === props.publication, ); + console.log(identity); return ( <> - + + +
@@ -113,23 +117,25 @@ const HomeButton = (props: { current?: boolean }) => { ); }; -const ReaderButton = (props: { current?: boolean }) => { +const ReaderButton = (props: { current?: boolean; subs: boolean }) => { let readerUnreads = true; - let subs = true; - if (subs) - return ( - - : } - label="Reader" - className={` + if (!props.subs) return; + return ( + + : } + label="Reader" + className={` ${readerUnreads ? "text-accent-contrast! border-accent-contrast" : props.current ? "bg-border-light! border-border" : ""} `} - /> - - ); + /> + + ); +}; + +const DiscoverButton = (props: { current?: boolean }) => { return (