22 lines
516 B
TypeScript
22 lines
516 B
TypeScript
import { usePagination } from "@/lib/hooks";
|
|
import { PropsWithChildren, createContext } from "react";
|
|
|
|
export interface IQuotesContextState {}
|
|
|
|
export const QuotesContext = createContext<IQuotesContextState | null>(null);
|
|
|
|
export const QuotesProvider = ({ children }: PropsWithChildren) => {
|
|
const [pagination, setPagination] = usePagination();
|
|
|
|
return (
|
|
<QuotesContext.Provider
|
|
value={{
|
|
pagination,
|
|
setPagination,
|
|
}}
|
|
>
|
|
{children}
|
|
</QuotesContext.Provider>
|
|
);
|
|
};
|