@c15t/nextjs
Version:
Developer-first CMP for Next.js: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization.
19 lines • 837 B
TypeScript
import type { GetServerSideProps } from 'next';
import type { InitialData } from '../../types';
interface WithInitialC15TDataProps {
initialC15TData?: InitialData;
}
/**
* Higher-order function that automatically adds to any page.
* For use in pages directory.
* @param getServerSideProps - Optional existing getServerSideProps function
* @returns Enhanced getServerSideProps with consent data
*
* @example
* ```tsx
* export const getServerSideProps = withInitialC15TData('https://your-instance.c15t.dev', getServerSideProps);
* ```
*/
export declare function withInitialC15TData<Props extends Record<string, unknown> = Record<string, never>>(backendURL: string, getServerSideProps?: GetServerSideProps<Props>): GetServerSideProps<Props & WithInitialC15TDataProps>;
export {};
//# sourceMappingURL=initial-data-hoc.d.ts.map