Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
411 B · 16 lines
TSX
1234567891011121314151617import { createContext, useContext } from "react";import type { EditorCommentInfo } from "./usePageEditorComments";
type EditorCommentContextValue = { pageID: string; comments: EditorCommentInfo[];};
export const EditorCommentContext = createContext<EditorCommentContextValue>({ pageID: "", comments: [],});
export function useEditorCommentContext() { return useContext(EditorCommentContext);}