diff options
Diffstat (limited to 'webui/src/layout')
-rw-r--r-- | webui/src/layout/IfLoggedIn.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webui/src/layout/IfLoggedIn.tsx b/webui/src/layout/IfLoggedIn.tsx index 8b9058dc..9f4a7576 100644 --- a/webui/src/layout/IfLoggedIn.tsx +++ b/webui/src/layout/IfLoggedIn.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useCurrentIdentityQuery } from './CurrentIdentity.generated'; -type Props = { children: React.ReactNode }; +type Props = { children: () => React.ReactNode }; const IfLoggedIn = ({ children }: Props) => { const { loading, error, data } = useCurrentIdentityQuery(); if (error || loading || !data?.repository?.userIdentity) return null; - return <>{children}</>; + return <>{children()}</>; }; export default IfLoggedIn; |