From 3dbb963e4e08cb684a61b2bba775c5524c551bbb Mon Sep 17 00:00:00 2001 From: Frank Johnson Date: Sat, 11 Sep 2021 22:14:18 -0400 Subject: [PATCH] Updated signed in user menu in IDE --- .../src/components/IdeHeader/IdeHeader.tsx | 2 +- .../ProfileSlashLogin/ProfileSlashLogin.tsx | 78 ++++++++----------- 2 files changed, 35 insertions(+), 45 deletions(-) diff --git a/app/web/src/components/IdeHeader/IdeHeader.tsx b/app/web/src/components/IdeHeader/IdeHeader.tsx index 62822db..43ac8f3 100644 --- a/app/web/src/components/IdeHeader/IdeHeader.tsx +++ b/app/web/src/components/IdeHeader/IdeHeader.tsx @@ -174,7 +174,7 @@ const IdeHeader = ({ }} {/* Fork */} -
+
diff --git a/app/web/src/components/ProfileSlashLogin/ProfileSlashLogin.tsx b/app/web/src/components/ProfileSlashLogin/ProfileSlashLogin.tsx index 22c0b8e..f403fd2 100644 --- a/app/web/src/components/ProfileSlashLogin/ProfileSlashLogin.tsx +++ b/app/web/src/components/ProfileSlashLogin/ProfileSlashLogin.tsx @@ -2,7 +2,8 @@ import { useState } from 'react' import { useAuth } from '@redwoodjs/auth' import { Link, routes } from '@redwoodjs/router' import ReactGA from 'react-ga' -import Popover from '@material-ui/core/Popover' +import { Popover } from '@headlessui/react' +import { ImageFallback } from 'src/components/ImageUploader' import useUser from 'src/helpers/hooks/useUser' import LoginModal from 'src/components/LoginModal' @@ -42,17 +43,38 @@ const ProfileSlashLogin = () => { return (
{isAuthenticated ? ( -
- -
+ + + {!loading && ( + + )} + + { currentUser && ( + + +

+ Hello {user?.name} +

+ +
+ +
View Your Profile
+ + + Logout + +
+ )} +
) : (
{
)} - {isAuthenticated && currentUser && ( - -
- -

- Hello {user?.name} -

- -
-
- -
Your Profile
- - - Logout - -
-
- )} setIsLoginModalOpen(false)}