From 3e43160cba72c33cf673a77fcb89c1c535ea7a05 Mon Sep 17 00:00:00 2001 From: celine Date: Mon, 9 Feb 2026 03:58:19 -0500 Subject: [PATCH] new files --- app/(home-pages)/reader/PreviewDrawer.tsx | 0 src/useSelectedPostState.ts | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/(home-pages)/reader/PreviewDrawer.tsx create mode 100644 src/useSelectedPostState.ts diff --git a/app/(home-pages)/reader/PreviewDrawer.tsx b/app/(home-pages)/reader/PreviewDrawer.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/useSelectedPostState.ts b/src/useSelectedPostState.ts new file mode 100644 index 00000000..88b06700 --- /dev/null +++ b/src/useSelectedPostState.ts @@ -0,0 +1,16 @@ +import { create } from "zustand"; +import type { NormalizedDocument } from "src/utils/normalizeRecords"; + +export type SelectedPostListing = { + document_uri: string; + document: NormalizedDocument; + drawer: "quotes" | "comments"; +}; + +export const useSelectedPostListing = create<{ + selectedPostListing: SelectedPostListing | null; + setSelectedPostListing: (post: SelectedPostListing | null) => void; +}>((set) => ({ + selectedPostListing: null, + setSelectedPostListing: (post) => set({ selectedPostListing: post }), +})); -- 2.51.2