1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

added settings and profile to user menu

This commit is contained in:
Fedor Katurov 2019-12-03 12:24:42 +07:00
parent 86622d6aa6
commit aed888e894
3 changed files with 45 additions and 22 deletions

View file

@ -36,7 +36,7 @@ const HeaderUnconnected: FC<IProps> = memo(
const [is_scrolled, setIsScrolled] = useState(false);
const onLogin = useCallback(() => showDialog(DIALOGS.LOGIN), [showDialog]);
const onProfileClick = useCallback(() => authOpenProfile(username), [authOpenProfile, user]);
// const onProfileClick = useCallback(() => authOpenProfile(username), [authOpenProfile, user]);
const onScroll = useCallback(() => {
const active = window.scrollY > 32;
@ -77,7 +77,7 @@ const HeaderUnconnected: FC<IProps> = memo(
)}
{is_user && (
<UserButton user={user} onLogout={authLogout} onProfileClick={onProfileClick} />
<UserButton user={user} onLogout={authLogout} authOpenProfile={authOpenProfile} />
)}
{!is_user && (