UNPKG

@nhost/react

Version:

Nhost React library

28 lines (27 loc) 859 B
import { PropsWithChildren } from 'react'; /** * Use `<SignedIn />` to control the rendering of components for users. Components inside `<SignedIn />` are only rendered if the user is authenticated. * * @example * ```tsx * import { NhostProvider, SignedIn } from "@nhost/react"; * import { nhost } from '@/utils/nhost'; * * function Page() { * return ( * <NhostProvider nhost={nhost}> * <SignedIn> * <h1>Only rendered if the user is authenticated</h1> * </SignedIn> * </NhostProvider> * ) * } * ``` * * @docs https://docs.nhost.io/reference/react/signed-in * @category Components */ export declare function SignedIn({ children }: PropsWithChildren<unknown>): import('react').FunctionComponentElement<{ children?: import('react').ReactNode | undefined; }> | null; //# sourceMappingURL=SignedIn.d.ts.map