Files
flyer-crawler.projectium.com/src/contexts/FlyersContext.ts

16 lines
439 B
TypeScript

// src/contexts/FlyersContext.ts
import { createContext } from 'react';
import type { Flyer } from '../types';
export interface FlyersContextType {
flyers: Flyer[];
isLoadingFlyers: boolean;
flyersError: Error | null;
fetchNextFlyersPage: () => void;
hasNextFlyersPage: boolean;
isRefetchingFlyers: boolean;
refetchFlyers: () => void;
}
export const FlyersContext = createContext<FlyersContextType | undefined>(undefined);