fix: page list all, favorite, trash

This commit is contained in:
alt0
2022-12-20 02:01:53 +08:00
parent 49f4c49426
commit f3644385a8
11 changed files with 135 additions and 36 deletions
@@ -30,6 +30,8 @@ export interface AppStateContext extends AppStateValue {
loadPage: (pageId: string) => Promise<StorePage | null> | null;
createPage: (pageId?: string) => Promise<string | null> | null;
getPageMeta: (pageId: string) => PageMeta | null;
toggleFavoritePage: (pageId: string) => void;
toggleDeletePage: (pageId: string) => void;
}
export const AppState = createContext<AppStateContext>({
@@ -50,6 +52,8 @@ export const AppState = createContext<AppStateContext>({
loadPage: () => null,
createPage: () => null,
getPageMeta: () => null,
toggleFavoritePage: () => {},
toggleDeletePage: () => {},
});
export const useAppState = () => {