diff --git a/src/components/PrivateRoute/PrivateRoute.tsx b/src/components/PrivateRoute/PrivateRoute.tsx index 1219852..9aaa4a5 100644 --- a/src/components/PrivateRoute/PrivateRoute.tsx +++ b/src/components/PrivateRoute/PrivateRoute.tsx @@ -5,7 +5,8 @@ import { PrivateRouteBase } from "./PrivateRouteBase"; export const PrivateRoute = async ({ children }: PropsWithChildren) => { const user = await getServerUser(); - if (!user) return null; // Prevent server side render of authorized page + // prevent server side render of authorized page + const view = !user ? null : children; - return {children}; + return {view}; };