diff options
Diffstat (limited to 'webui/src/layout/ReadonlyHidden.tsx')
-rw-r--r-- | webui/src/layout/ReadonlyHidden.tsx | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/webui/src/layout/ReadonlyHidden.tsx b/webui/src/layout/ReadonlyHidden.tsx deleted file mode 100644 index 9ed0af6ac..000000000 --- a/webui/src/layout/ReadonlyHidden.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; - -import CurrentIdentityContext from './CurrentIdentityContext'; - -type Props = { children: React.ReactNode }; -const ReadonlyHidden = ({ children }: Props) => ( - <CurrentIdentityContext.Consumer> - {context => { - if (!context) return null; - const { loading, error, data } = context; - - if (error || loading || !data?.repository?.userIdentity) return null; - - return <>{children}</>; - }} - </CurrentIdentityContext.Consumer> -); - -export default ReadonlyHidden; |