import { useIdentityData } from "components/IdentityProvider"; import { navPages, NotificationButton, ReaderButton, WriterButton, } from "./NavigationButtons"; import { PublicationButtons } from "./Publications"; import { Sidebar } from "./Sidebar"; import { LoginModal } from "components/LoginButton"; import { ProfileButton } from "./ProfileButton"; import { ActionButton } from "./ActionButton"; import { AccountSmall } from "components/Icons/AccountSmall"; import { TabsSmall } from "components/Icons/TabsSmall"; type NavigationProps = { pageTitle: React.ReactNode; currentPage: navPages; publication?: string; actions?: React.ReactNode; tabs?: { [name: string]: { icon?: React.ReactNode } }; currentTab?: string; onTabClick?: (tab: string) => void; onTabHover?: (tab: string) => void; }; export const NavigationContent = (props: NavigationProps) => { let { identity } = useIdentityData(); let isWriterPage = props.currentPage === "home" || props.currentPage === "looseleafs" || props.currentPage === "pub"; return ( <> {props.pageTitle}
{props.actions && ( <>
{props.actions}

)} {props.tabs && Object.keys(props.tabs).length > 1 && ( <> {Object.keys(props.tabs).map((t) => ( } label={t} className={ t === props.currentTab ? "bg-bg-page! border-border-light!" : "" } onClick={() => props.onTabClick?.(t)} onMouseEnter={() => props.onTabHover?.(t)} onPointerDown={() => props.onTabHover?.(t)} /> ))} )} {props.currentPage === "home" && ( <>
PUBLICATIONS
)}
{isWriterPage && ( )} {identity?.atp_did && ( )} {identity ? ( <>
) : ( } label="Log In/Sign Up" /> } /> )} ); }; export const PageTitle = (props: { pageTitle: string; icon: React.ReactNode; }) => { return (
{/*{props.icon}*/}
{props.pageTitle}
); }; export const DesktopNavigation = (props: NavigationProps) => { return ( ); };