Files
feishin/src/renderer/context/list-context.tsx
T
2025-11-29 19:30:51 -08:00

21 lines
477 B
TypeScript

import { createContext, useContext } from 'react';
import { ListKey } from '/@/renderer/store';
interface ListContextProps {
customFilters?: Record<string, unknown>;
id?: string;
itemCount?: number;
pageKey: ListKey;
setItemCount?: (itemCount: number) => void;
}
export const ListContext = createContext<ListContextProps>({
pageKey: '',
});
export const useListContext = () => {
const ctxValue = useContext(ListContext);
return ctxValue;
};