plane/web/lib/wrappers/authentication-wrapper.tsx

21 lines
494 B
TypeScript
Raw Normal View History

2024-04-30 11:34:49 +00:00
import { FC, ReactNode } from "react";
2024-05-01 06:43:36 +00:00
// hooks
import { useUser } from "@/hooks/store";
2024-04-30 11:34:49 +00:00
type TPageType = "public" | "onboarding" | "private";
type TAuthenticationWrapper = {
children: ReactNode;
pageType: TPageType;
};
export const AuthenticationWrapper: FC<TAuthenticationWrapper> = (props) => {
const { children, pageType } = props;
2024-05-01 06:43:36 +00:00
// hooks
const { data: currentUser } = useUser();
console.log("currentUser", currentUser);
2024-04-30 11:34:49 +00:00
return <div key={pageType}>{children}</div>;
};