'use client' import { createContext, type ReactNode, useContext, useMemo, useState } from 'react' type Value = { isPending: boolean setPending: (pending: boolean) => void } const Ctx = createContext(null) export function GeneratedImageProvider({ children }: { children: ReactNode }) { const [isPending, setPending] = useState(false) const value = useMemo(() => ({ isPending, setPending }), [isPending]) return {children} } export const useGeneratedImageContext = () => useContext(Ctx)