diff --git a/packages/app/src/Element/Event/NoteCreatorButton.tsx b/packages/app/src/Element/Event/NoteCreatorButton.tsx index cd16d59e..fef8c184 100644 --- a/packages/app/src/Element/Event/NoteCreatorButton.tsx +++ b/packages/app/src/Element/Event/NoteCreatorButton.tsx @@ -10,7 +10,7 @@ import Icon from "@/Icons/Icon"; import { useNoteCreator } from "@/State/NoteCreator"; import { NoteCreator } from "./NoteCreator"; -export const NoteCreatorButton = ({ className }: { className?: string }) => { +export const NoteCreatorButton = ({ className, alwaysShow }: { className?: string, alwaysShow?: boolean }) => { const buttonRef = useRef(null); const location = useLocation(); const { readonly } = useLogin(s => ({ readonly: s.readonly })); @@ -27,6 +27,9 @@ export const NoteCreatorButton = ({ className }: { className?: string }) => { }); const shouldHideNoteCreator = useMemo(() => { + if (alwaysShow) { + return false; + } const isReply = replyTo && show; const hideOn = [ "/settings", diff --git a/packages/app/src/Pages/Layout/NavSidebar.tsx b/packages/app/src/Pages/Layout/NavSidebar.tsx index c41b532b..bab6befb 100644 --- a/packages/app/src/Pages/Layout/NavSidebar.tsx +++ b/packages/app/src/Pages/Layout/NavSidebar.tsx @@ -5,10 +5,11 @@ import {ProfileLink} from "../../Element/User/ProfileLink"; import Avatar from "../../Element/User/Avatar"; import useLogin from "../../Hooks/useLogin"; import {useUserProfile} from "@snort/system-react"; +import {NoteCreatorButton} from "../../Element/Event/NoteCreatorButton"; const MENU_ITEMS = [ { - label: "Notes", + label: "Home", icon: "notes", link: "/", }, @@ -39,29 +40,34 @@ export default function NavSidebar() { const profile = useUserProfile(publicKey); return ( -
+
-
+
{MENU_ITEMS.map(item => ( {item.label} ))} +
+ +
{publicKey ? ( - -
- - {profile?.name} -
-
+ <> + +
+ + {profile?.name} +
+
+ ) : ''}
); diff --git a/packages/app/src/Pages/Layout/index.tsx b/packages/app/src/Pages/Layout/index.tsx index a570e238..e1382465 100644 --- a/packages/app/src/Pages/Layout/index.tsx +++ b/packages/app/src/Pages/Layout/index.tsx @@ -61,7 +61,9 @@ export default function Index() {
- +
+ +