From 134ac8aacd218630722a88bd0daaf346270edbff Mon Sep 17 00:00:00 2001 From: Lena Date: Thu, 11 Mar 2021 15:57:54 +0100 Subject: 12 Add code to dynamically switch depending on valuue for isProtected --- webui/src/components/CurrentIdentity/CurrentIdentity.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'webui/src/components/CurrentIdentity') diff --git a/webui/src/components/CurrentIdentity/CurrentIdentity.tsx b/webui/src/components/CurrentIdentity/CurrentIdentity.tsx index 2921e2bf..bec8d14f 100644 --- a/webui/src/components/CurrentIdentity/CurrentIdentity.tsx +++ b/webui/src/components/CurrentIdentity/CurrentIdentity.tsx @@ -11,6 +11,7 @@ import { } from '@material-ui/core'; import Avatar from '@material-ui/core/Avatar'; import { makeStyles } from '@material-ui/core/styles'; +import LockIcon from '@material-ui/icons/Lock'; import { useCurrentIdentityQuery } from './CurrentIdentity.generated'; @@ -18,6 +19,9 @@ const useStyles = makeStyles((theme) => ({ displayName: { marginLeft: theme.spacing(2), }, + hidden: { + display: 'none', + }, })); const CurrentIdentity = () => { @@ -30,6 +34,7 @@ const CurrentIdentity = () => { if (error || loading || !data?.repository?.userIdentity) return null; const user = data.repository.userIdentity; + const handleToggle = () => { setOpen((prevOpen) => !prevOpen); }; @@ -53,6 +58,7 @@ const CurrentIdentity = () => { {user.displayName.charAt(0).toUpperCase()} + { Email: {user.email ? user.email : 'none'} Login: {user.login ? user.login : 'none'} - - Protected: {user.isProtected ? user.login : 'not set'} + + Protected: {user.isProtected} -- cgit