+ {/* Header */}
+
+
+
+ {wordCount > 0 ? `${wordCount} words` : "New article"}
+ {draft && !published && (
+ · draft saved
+ )}
+
+
+
+ {/* Write / Preview toggle */}
+
+
+
+
+
+
+
+
+
+
+
+ {/* Meta panel */}
+ {showMeta && (
+
+ )}
+
+ {error && (
+
+ {error}
+
+ )}
+
+ {/* Editor */}
+
+ {/* Title */}
+
+ setTitle(e.target.value)}
+ placeholder="Title"
+ className="w-full bg-transparent text-text text-2xl font-bold placeholder:text-text-dim focus:outline-none"
+ />
+
+
+ {/* Content area */}
+
+ {mode === "write" ? (
+
+
+
+ );
+}
diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx
index 22f97c0..739cea2 100644
--- a/src/components/sidebar/Sidebar.tsx
+++ b/src/components/sidebar/Sidebar.tsx
@@ -12,7 +12,7 @@ const NAV_ITEMS = [
] as const;
export function Sidebar() {
- const { currentView, setView, sidebarCollapsed, toggleSidebar } = useUIStore();
+ const { currentView, setView, sidebarCollapsed, toggleSidebar, openThread, goBack } = useUIStore();
const { connected, notes } = useFeedStore();
const { loggedIn, profile, npub, logout } = useUserStore();
const [showLogin, setShowLogin] = useState(false);
@@ -43,6 +43,19 @@ export function Sidebar() {
{/* Nav */}