[portal][refactor] standardize login/logout terminology

pull/526/head
Yangshun Tay 2 years ago
parent 5d34a44237
commit 5ecaf75270

@ -38,7 +38,7 @@ function ProfileJewel() {
if (session == null) { if (session == null) {
return router.pathname !== loginHref.pathname ? ( return router.pathname !== loginHref.pathname ? (
<Link className="text-base" href={loginHref}> <Link className="text-base" href={loginHref}>
Log In Sign In
</Link> </Link>
) : null; ) : null;
} }
@ -47,7 +47,7 @@ function ProfileJewel() {
// { href: '/profile', name: 'Profile' }, // { href: '/profile', name: 'Profile' },
{ {
href: '/api/auth/signout', href: '/api/auth/signout',
name: 'Log out', name: 'Sign Out',
onClick: (event: MouseEvent) => { onClick: (event: MouseEvent) => {
event.preventDefault(); event.preventDefault();
signOut(); signOut();
@ -80,6 +80,15 @@ function ProfileJewel() {
leaveFrom="transform opacity-100 scale-100" leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"> leaveTo="transform opacity-0 scale-95">
<Menu.Items className="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"> <Menu.Items className="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
{!!session?.user?.name && (
<Menu.Item>
{() => (
<span className="block px-4 py-2 text-sm font-semibold text-slate-700">
{session?.user?.name ?? ''}
</span>
)}
</Menu.Item>
)}
{userNavigation.map((item) => ( {userNavigation.map((item) => (
<Menu.Item key={item.name}> <Menu.Item key={item.name}>
{({ active }) => ( {({ active }) => (

@ -91,7 +91,7 @@ export default function ProfileComments({
}, },
); );
} else { } 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(); signIn();
} }
} }

@ -89,7 +89,7 @@ export default function CommentCard({
}, },
); );
} else { } 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(); signIn();
} }
} }

@ -15,7 +15,7 @@ export default function ResumeSignInButton({ text, className }: Props) {
<Link <Link
className="text-primary-500 hover:text-primary-600" className="text-primary-500 hover:text-primary-600"
href={loginPageHref()}> href={loginPageHref()}>
Log in Sign in
</Link>{' '} </Link>{' '}
{text} {text}
</p> </p>

@ -32,11 +32,11 @@ export default function LoginPage({
src="/logo.svg" src="/logo.svg"
/> />
<h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-slate-900"> <h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-slate-900">
Tech Interview Handbook Portal Sign in to Tech Interview Handbook Portal
</h2> </h2>
<p className="mt-2 text-center text-slate-600"> <p className="mt-2 text-center text-slate-600">
Get your resumes peer-reviewed, discuss solutions to tech interview Get your resumes peer-reviewed, discuss solutions to tech interview
questions, get offer data points. questions, explore offer data points.
</p> </p>
</div> </div>
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md"> <div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">

@ -176,7 +176,7 @@ export default function ResumeReviewPage() {
<Button <Button
display="block" display="block"
href={loginPageHref()} href={loginPageHref()}
label="Log in to join discussion" label="Sign in to comment"
variant="primary" variant="primary"
/> />
); );

Loading…
Cancel
Save