@@ -6,6 +6,7 @@ import useVersion from '../hooks/useVersion';
66import IconWithDot from './IconWithDot' ;
77import { PiGear } from 'react-icons/pi' ;
88import { fetchAuthSession } from 'aws-amplify/auth' ;
9+ import useUserSetting from '../hooks/useUserSetting' ;
910
1011type Props = BaseProps & {
1112 builderMode ?: boolean ;
@@ -14,6 +15,7 @@ type Props = BaseProps & {
1415
1516const DrawerBase : React . FC < Props > = ( props ) => {
1617 const { getHasUpdate } = useVersion ( ) ;
18+ const { settingShowEmail } = useUserSetting ( ) ;
1719
1820 // The first argument is not required, but if it is not included, the request will not be made, so 'user' string is entered
1921 const { data } = useSWR ( 'user' , ( ) => {
@@ -36,12 +38,9 @@ const DrawerBase: React.FC<Props> = (props) => {
3638 className = { `bg-aws-squid-ink flex h-screen w-64 flex-col justify-between text-sm text-white print:hidden` } >
3739 < div className = "flex h-full flex-col" >
3840 { props . children }
39- < div className = "flex flex-none items-center justify-between gap-2 border-t border-gray-400 px-3 py-2" >
40- < Link
41- to = { settingUrl }
42- className = "mr-2 overflow-x-hidden hover:brightness-75" >
43- < span className = "text-sm" > { email } </ span >
44- </ Link >
41+ < div className = "flex flex-none items-center justify-between gap-x-2 border-t border-gray-400 px-3 py-2" >
42+ { settingShowEmail && < div className = "text-sm" > { email } </ div > }
43+ < div > </ div >
4544 < Link to = { settingUrl } >
4645 < IconWithDot showDot = { hasUpdate } >
4746 < PiGear className = "text-lg" />
0 commit comments