redwood-clerk
Version:
Unofficial Clerk integration for RedwoodSDK
22 lines (21 loc) • 983 B
TypeScript
import { ProtectProps } from "@clerk/clerk-react";
import * as react_jsx_runtime0 from "react/jsx-runtime";
import { PropsWithChildren } from "react";
//#region src/server/control-components.d.ts
declare function SignedIn(props: PropsWithChildren<{}>): Promise<react_jsx_runtime0.JSX.Element | null>;
declare function SignedOut(props: PropsWithChildren<{}>): Promise<react_jsx_runtime0.JSX.Element | null>;
/**
* Use `<Protect/>` in order to prevent unauthenticated or unauthorized users from accessing the children passed to the component.
*
* Examples:
* ```
* <Protect permission="a_permission_key" />
* <Protect role="a_role_key" />
* <Protect condition={(has) => has({permission:"a_permission_key"})} />
* <Protect condition={(has) => has({role:"a_role_key"})} />
* <Protect fallback={<p>Unauthorized</p>} />
* ```
*/
declare function Protect(props: ProtectProps): Promise<react_jsx_runtime0.JSX.Element | null>;
//#endregion
export { Protect, SignedIn, SignedOut };