import { createContext, useContext } from 'react'; export interface IndexPageContextValue {} export const IndexPageContext = createContext(null); export function useIndexPageContext(): IndexPageContextValue { const context = useContext(IndexPageContext); if (!context) { throw new Error('useIndexPageContext must be used within an IndexPageProvider'); } return context; }