Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
123456789101112131415161718192021import { create } from "zustand";import type { NormalizedDocument, NormalizedPublication,} from "src/utils/normalizeRecords";
type SelectedPostListing = { document_uri: string; document: NormalizedDocument; publication?: NormalizedPublication; drawer: "quotes" | "comments";};
export const useSelectedPostListing = create<{ selectedPostListing: SelectedPostListing | null; setSelectedPostListing: (post: SelectedPostListing | null) => void;}>((set) => ({ selectedPostListing: null, setSelectedPostListing: (post) => set({ selectedPostListing: post }),}));