import { Notification } from "../types"; function prettyName(s: string | undefined): string { if (!s) { return ""; } return s.replaceAll("/", " / "); } export function TopBar({ pageName, unsavedChanges, notifications, onClick, lhs, rhs, }: { pageName?: string; unsavedChanges: boolean; notifications: Notification[]; onClick: () => void; lhs?: React.ReactNode; rhs?: React.ReactNode; }) { return (
{lhs}
{/**/} {/* */} {/**/} {prettyName(pageName)} {/* {*/} {/* // @ts-ignore*/} {/* window.syncer();*/} {/* e.stopPropagation();*/} {/* }}*/} {/*>*/} {/* Sync*/} {/**/} {notifications.length > 0 && (
{notifications.map((notification) => (
{notification.message}
))}
)}
{rhs}
); }