a tool for shared writing and social publishing

remove page name from footer

+23 -21
+20 -20
components/ActionBar/Navigation.tsx
··· 11 ReaderReadSmall, 12 ReaderUnreadSmall, 13 } from "components/Icons/ReaderSmall"; 14 - import { NotificationsUnreadSmall } from "components/Icons/NotificationSmall"; 15 import { SpeedyLink } from "components/SpeedyLink"; 16 import { NotificationInstance } from "twilio/lib/rest/api/v2010/account/notification"; 17 import { getIdentityData } from "actions/getIdentityData"; ··· 51 (pub) => pub.uri === props.publication, 52 ); 53 return ( 54 - <div className="flex gap-1 pr-2"> 55 <Popover 56 onOpenAutoFocus={(e) => e.preventDefault()} 57 asChild ··· 59 trigger={ 60 <div className="shrink-0 p-1 text-accent-contrast h-full flex gap-2 font-bold items-center"> 61 <MenuSmall /> 62 - {props.currentPage !== "notifications" && ( 63 <div className="truncate max-w-[72px]"> 64 {props.currentPage === "home" ? ( 65 <>Home</> ··· 71 thisPublication && <>{thisPublication.name}</> 72 ) : null} 73 </div> 74 - )} 75 </div> 76 } 77 > ··· 81 isMobile 82 /> 83 </Popover> 84 <NotificationButton /> 85 </div> 86 ); ··· 103 subs={identity?.publication_subscriptions?.length !== 0} 104 /> 105 <DiscoverButton current={props.currentPage === "discover"} /> 106 - {/*{identity && ( 107 - <> 108 - <hr className="border-dashed border-border-light" /> 109 - <NotificationButton current={props.currentPage === "notifications"} /> 110 - </> 111 - )}*/} 112 113 <hr className="border-border-light my-1" /> 114 <PublicationButtons currentPubUri={thisPublication?.uri} /> ··· 162 ); 163 }; 164 165 - function NotificationButton(props: { current?: boolean }) { 166 // let identity = await getIdentityData(); 167 // if (!identity?.atp_did) return; 168 // let { data } = await supabaseServerClient ··· 176 asChild 177 trigger={ 178 <ActionButton 179 - icon={<NotificationsUnreadSmall />} 180 label="Notifications" 181 className={props.current ? "bg-bg-page! border-border-light!" : ""} 182 /> 183 } 184 > 185 - <div className="flex flex-col gap-6 pt-3"> 186 - {/*{notifications.map((n) => { 187 - if (n.type === "comment") { 188 - n; 189 - return <CommentNotification key={n.id} {...n} />; 190 - } 191 - })}*/} 192 - </div> 193 <SpeedyLink href={"/notifications"}>See All</SpeedyLink> 194 </Popover> 195 );
··· 11 ReaderReadSmall, 12 ReaderUnreadSmall, 13 } from "components/Icons/ReaderSmall"; 14 + import { 15 + NotificationsReadSmall, 16 + NotificationsUnreadSmall, 17 + } from "components/Icons/NotificationSmall"; 18 import { SpeedyLink } from "components/SpeedyLink"; 19 import { NotificationInstance } from "twilio/lib/rest/api/v2010/account/notification"; 20 import { getIdentityData } from "actions/getIdentityData"; ··· 54 (pub) => pub.uri === props.publication, 55 ); 56 return ( 57 + <div className="flex gap-1 "> 58 <Popover 59 onOpenAutoFocus={(e) => e.preventDefault()} 60 asChild ··· 62 trigger={ 63 <div className="shrink-0 p-1 text-accent-contrast h-full flex gap-2 font-bold items-center"> 64 <MenuSmall /> 65 + {/*{props.currentPage !== "notifications" && ( 66 <div className="truncate max-w-[72px]"> 67 {props.currentPage === "home" ? ( 68 <>Home</> ··· 74 thisPublication && <>{thisPublication.name}</> 75 ) : null} 76 </div> 77 + )}*/} 78 </div> 79 } 80 > ··· 84 isMobile 85 /> 86 </Popover> 87 + <Separator /> 88 <NotificationButton /> 89 </div> 90 ); ··· 107 subs={identity?.publication_subscriptions?.length !== 0} 108 /> 109 <DiscoverButton current={props.currentPage === "discover"} /> 110 111 <hr className="border-border-light my-1" /> 112 <PublicationButtons currentPubUri={thisPublication?.uri} /> ··· 160 ); 161 }; 162 163 + export function NotificationButton(props: { current?: boolean }) { 164 + let unreads = true; 165 // let identity = await getIdentityData(); 166 // if (!identity?.atp_did) return; 167 // let { data } = await supabaseServerClient ··· 175 asChild 176 trigger={ 177 <ActionButton 178 + nav 179 + labelOnMobile={false} 180 + icon={ 181 + unreads ? ( 182 + <NotificationsUnreadSmall className="text-accent-contrast" /> 183 + ) : ( 184 + <NotificationsReadSmall /> 185 + ) 186 + } 187 label="Notifications" 188 className={props.current ? "bg-bg-page! border-border-light!" : ""} 189 /> 190 } 191 > 192 + <div className="flex flex-col gap-6 pt-3"></div> 193 <SpeedyLink href={"/notifications"}>See All</SpeedyLink> 194 </Popover> 195 );
+3 -1
components/PageLayouts/DashboardLayout.tsx
··· 8 DesktopNavigation, 9 MobileNavigation, 10 navPages, 11 } from "components/ActionBar/Navigation"; 12 import { create } from "zustand"; 13 import { Popover } from "components/Popover"; ··· 139 const tabParam = searchParams.get("tab"); 140 141 // Initialize tab from search param if valid, otherwise use default 142 - const initialTab = tabParam && props.tabs[tabParam] ? tabParam : props.defaultTab; 143 let [tab, setTab] = useState<keyof T>(initialTab); 144 145 // Custom setter that updates both state and URL
··· 8 DesktopNavigation, 9 MobileNavigation, 10 navPages, 11 + NotificationButton, 12 } from "components/ActionBar/Navigation"; 13 import { create } from "zustand"; 14 import { Popover } from "components/Popover"; ··· 140 const tabParam = searchParams.get("tab"); 141 142 // Initialize tab from search param if valid, otherwise use default 143 + const initialTab = 144 + tabParam && props.tabs[tabParam] ? tabParam : props.defaultTab; 145 let [tab, setTab] = useState<keyof T>(initialTab); 146 147 // Custom setter that updates both state and URL