Working feed: NDK + relay connection + live notes from Nostr

- Tailwind CSS + Zustand + NDK installed and configured
- Sidebar with feed/relays/settings navigation
- Global feed view with live notes from relays
- Profile fetching with caching and deduplication
- Relay connection with timeout handling
- Note cards with avatar, name, timestamp, content
- Dark theme, monospace, no-slop UI
- Devtools enabled for debugging
This commit is contained in:
Jure
2026-03-08 14:54:04 +01:00
parent 43e14f9f04
commit b75ccb7f46
22 changed files with 2066 additions and 246 deletions

17
src/stores/ui.ts Normal file
View File

@@ -0,0 +1,17 @@
import { create } from "zustand";
type View = "feed" | "relays" | "settings";
interface UIState {
currentView: View;
sidebarCollapsed: boolean;
setView: (view: View) => void;
toggleSidebar: () => void;
}
export const useUIStore = create<UIState>((set) => ({
currentView: "feed",
sidebarCollapsed: false,
setView: (currentView) => set({ currentView }),
toggleSidebar: () => set((s) => ({ sidebarCollapsed: !s.sidebarCollapsed })),
}));