a tool for shared writing and social publishing
1import { create } from "zustand";
2import type { NormalizedDocument } from "src/utils/normalizeRecords";
3
4export type SelectedPostListing = {
5 document_uri: string;
6 document: NormalizedDocument;
7 drawer: "quotes" | "comments";
8};
9
10export const useSelectedPostListing = create<{
11 selectedPostListing: SelectedPostListing | null;
12 setSelectedPostListing: (post: SelectedPostListing | null) => void;
13}>((set) => ({
14 selectedPostListing: null,
15 setSelectedPostListing: (post) => set({ selectedPostListing: post }),
16}));