From 5ecaf75270a5f0788a6da7afa8039cda060f0e69 Mon Sep 17 00:00:00 2001
From: Yangshun Tay
Date: Mon, 7 Nov 2022 17:15:52 +0800
Subject: [PATCH] [portal][refactor] standardize login/logout terminology
---
apps/portal/src/components/global/AppShell.tsx | 13 +++++++++++--
.../components/offers/profile/ProfileComments.tsx | 2 +-
.../offers/profile/comments/CommentCard.tsx | 2 +-
.../resumes/shared/ResumeSignInButton.tsx | 2 +-
apps/portal/src/pages/login.tsx | 4 ++--
apps/portal/src/pages/resumes/[resumeId].tsx | 2 +-
6 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/apps/portal/src/components/global/AppShell.tsx b/apps/portal/src/components/global/AppShell.tsx
index aa98eca6..9f37b355 100644
--- a/apps/portal/src/components/global/AppShell.tsx
+++ b/apps/portal/src/components/global/AppShell.tsx
@@ -38,7 +38,7 @@ function ProfileJewel() {
if (session == null) {
return router.pathname !== loginHref.pathname ? (
- Log In
+ Sign In
) : null;
}
@@ -47,7 +47,7 @@ function ProfileJewel() {
// { href: '/profile', name: 'Profile' },
{
href: '/api/auth/signout',
- name: 'Log out',
+ name: 'Sign Out',
onClick: (event: MouseEvent) => {
event.preventDefault();
signOut();
@@ -80,6 +80,15 @@ function ProfileJewel() {
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95">
+ {!!session?.user?.name && (
+
+ {() => (
+
+ {session?.user?.name ?? ''}
+
+ )}
+
+ )}
{userNavigation.map((item) => (
{({ active }) => (
diff --git a/apps/portal/src/components/offers/profile/ProfileComments.tsx b/apps/portal/src/components/offers/profile/ProfileComments.tsx
index a9357d92..326ca3e1 100644
--- a/apps/portal/src/components/offers/profile/ProfileComments.tsx
+++ b/apps/portal/src/components/offers/profile/ProfileComments.tsx
@@ -91,7 +91,7 @@ export default function ProfileComments({
},
);
} else {
- // If not the OP and not logged in, direct users to log in
+ // If not the OP and not logged in, direct users to sign in
signIn();
}
}
diff --git a/apps/portal/src/components/offers/profile/comments/CommentCard.tsx b/apps/portal/src/components/offers/profile/comments/CommentCard.tsx
index 7c198d32..2b1022ba 100644
--- a/apps/portal/src/components/offers/profile/comments/CommentCard.tsx
+++ b/apps/portal/src/components/offers/profile/comments/CommentCard.tsx
@@ -89,7 +89,7 @@ export default function CommentCard({
},
);
} else {
- // If not the OP and not logged in, direct users to log in
+ // If not the OP and not logged in, direct users to sign in
signIn();
}
}
diff --git a/apps/portal/src/components/resumes/shared/ResumeSignInButton.tsx b/apps/portal/src/components/resumes/shared/ResumeSignInButton.tsx
index ce390fb7..faf7ee65 100644
--- a/apps/portal/src/components/resumes/shared/ResumeSignInButton.tsx
+++ b/apps/portal/src/components/resumes/shared/ResumeSignInButton.tsx
@@ -15,7 +15,7 @@ export default function ResumeSignInButton({ text, className }: Props) {
- Log in
+ Sign in
{' '}
{text}
diff --git a/apps/portal/src/pages/login.tsx b/apps/portal/src/pages/login.tsx
index 8223c02c..28b3088a 100644
--- a/apps/portal/src/pages/login.tsx
+++ b/apps/portal/src/pages/login.tsx
@@ -32,11 +32,11 @@ export default function LoginPage({
src="/logo.svg"
/>
- Tech Interview Handbook Portal
+ Sign in to Tech Interview Handbook Portal
Get your resumes peer-reviewed, discuss solutions to tech interview
- questions, get offer data points.
+ questions, explore offer data points.
diff --git a/apps/portal/src/pages/resumes/[resumeId].tsx b/apps/portal/src/pages/resumes/[resumeId].tsx
index fc547bb4..2d703086 100644
--- a/apps/portal/src/pages/resumes/[resumeId].tsx
+++ b/apps/portal/src/pages/resumes/[resumeId].tsx
@@ -176,7 +176,7 @@ export default function ResumeReviewPage() {
);