Skip to content

Commit

Permalink
fix: layout shift on login button
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 24, 2024
1 parent 47ba66e commit ea9ee7a
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/features/users/views/UserTrayView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ export function UserTrayView({ activeClass, returnUrl, ...rest }: UserTrayViewPr

if (auth.isLoading()) {
return (
<a href="#" style={{ background: 'none !important', visibility: 'hidden' }}>
<a
href="#"
style={{
background: 'none !important',
visibility: 'hidden',
display: 'flex',
alignItems: 'center',
gap: '0.5rem',
minWidth: '114px',
}}
>
<i className="icon-user" style={{ marginRight: '0.5rem' }} /> Profile
</a>
)
Expand All @@ -27,6 +37,12 @@ export function UserTrayView({ activeClass, returnUrl, ...rest }: UserTrayViewPr
activeClass={activeClass}
href={Routes.Login + (returnUrl ? '?s=' + returnUrl : '')}
tabIndex={0}
style={{
display: 'flex',
alignItems: 'center',
gap: '0.5rem',
minWidth: '114px',
}}
>
Sign In
</SiteLink>
Expand All @@ -40,6 +56,12 @@ export function UserTrayView({ activeClass, returnUrl, ...rest }: UserTrayViewPr
activeClass={activeClass}
href={Routes.VerifyEmail + ('?email=' + encodeURIComponent(auth.currentUser?.email || ''))}
tabIndex={0}
style={{
display: 'flex',
alignItems: 'center',
gap: '0.5rem',
minWidth: '114px',
}}
>
<i className="icon-email" style={{ marginRight: '0.5rem' }} /> Verify Email
</SiteLink>
Expand All @@ -56,6 +78,7 @@ export function UserTrayView({ activeClass, returnUrl, ...rest }: UserTrayViewPr
display: 'flex',
alignItems: 'center',
gap: '0.5rem',
minWidth: '114px',
}}
>
<i>
Expand Down

1 comment on commit ea9ee7a

@vercel
Copy link

@vercel vercel bot commented on ea9ee7a Aug 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.