From 29ea8df4259921f1789e0e6d584767fc5f54b284 Mon Sep 17 00:00:00 2001 From: Cláudio Date: Fri, 5 Feb 2021 19:36:09 -0300 Subject: Commit for #541 --- webui/src/layout/IfLoggedIn.tsx | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 webui/src/layout/IfLoggedIn.tsx (limited to 'webui/src/layout/IfLoggedIn.tsx') diff --git a/webui/src/layout/IfLoggedIn.tsx b/webui/src/layout/IfLoggedIn.tsx deleted file mode 100644 index 9f4a7576..00000000 --- a/webui/src/layout/IfLoggedIn.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -import { useCurrentIdentityQuery } from './CurrentIdentity.generated'; - -type Props = { children: () => React.ReactNode }; -const IfLoggedIn = ({ children }: Props) => { - const { loading, error, data } = useCurrentIdentityQuery(); - - if (error || loading || !data?.repository?.userIdentity) return null; - - return <>{children()}; -}; - -export default IfLoggedIn; -- cgit