calcom/lib/types/inferSSRProps.ts
Alex Johansson 7e6e935ed3
add free plan ()
- add new fields to support this
- when free:
  - fade out all event types after first
  - hide events after first on booking page
  - make booking page after the first one 404 if accessed directly
- add e2e tests
2021-09-06 13:51:15 +00:00

11 lines
357 B
TypeScript

/* eslint-disable @typescript-eslint/no-explicit-any */
type GetSSRResult<TProps> =
//
{ props: TProps } | { redirect: any } | { notFound: boolean };
type GetSSRFn<TProps> = (...args: any[]) => Promise<GetSSRResult<TProps>>;
export type inferSSRProps<TFn extends GetSSRFn<any>> = TFn extends GetSSRFn<infer TProps>
? NonNullable<TProps>
: never;