Skip to content

Commit

Permalink
fix(routes): replace "login" with "log in"
Browse files Browse the repository at this point in the history
This patch replaces the noun "Login" with the verb phrase "Log in" to
better represent what we're doing. We are not referring to your "Login"
(noun; meaning username + password) but rather that you _can_ "log in"
to the app by clicking a button or link to the log in page.

Ref: https://grammarist.com/spelling/log-in-login/
Ref: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label
  • Loading branch information
nicholaschiang committed Jul 28, 2023
1 parent 8e35cfc commit 59baaa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ function Header() {
<div className='flex items-center'>
{!matches.some((match) => match.id.includes('login')) && (
<Link
aria-label={user ? 'Log out' : 'Log in'}
className={buttonVariants({ size: 'icon', variant: 'ghost' })}
to={user ? '/logout' : '/login'}
>
Expand Down
4 changes: 2 additions & 2 deletions app/routes/_layout.login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function LoginPage() {
<Form asChild className='max-w-sm w-full mx-auto mt-6 p-6'>
<RemixForm method='post' {...form.props}>
<header className='mb-2'>
<h1 className='text-2xl font-medium'>Login</h1>
<h1 className='text-2xl font-medium'>Log in</h1>
<p className='text-sm text-gray-500 dark:text-gray-400'>
Don’t have an account?{' '}
<Link
Expand Down Expand Up @@ -134,7 +134,7 @@ export default function LoginPage() {
</FormControl>
</FormField>
<FormSubmit asChild>
<Button disabled={navigation.state !== 'idle'}>Login</Button>
<Button disabled={navigation.state !== 'idle'}>Log in</Button>
</FormSubmit>
</RemixForm>
</Form>
Expand Down

0 comments on commit 59baaa9

Please sign in to comment.