aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/layout/ReadonlyHidden.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/layout/ReadonlyHidden.tsx')
-rw-r--r--webui/src/layout/ReadonlyHidden.tsx19
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 9ed0af6a..00000000
--- 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;