Skip to content

Commit

Permalink
Show hide auth elements change
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Apr 9, 2023
1 parent 332c71c commit aece5a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Authenticator/authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function handleGuest() {
* Prepares the UI for the user who is logged out
*/
function handleAuthenticated() {
showHideAuthElements('show');
showHideGuestElements('hide');
showHideAuthElements('show');
}

function handleAuthRequired() {
Expand Down
8 changes: 5 additions & 3 deletions src/components/Navigation/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import AccountDropdown from './AccountDropdown.astro';
<li>
<a href='/videos' class='text-gray-400 hover:text-white'>Videos</a>
</li>
</ul>
<ul class='hidden w-[172px] h-8 items-center gap-5 sm:flex justify-end'>
<li data-guest-required>
<a href='/login' class='text-gray-400 hover:text-white'>Login</a>
</li>
Expand All @@ -34,7 +36,7 @@ import AccountDropdown from './AccountDropdown.astro';

<a
data-guest-required
class='flex h-8 w-28 cursor-pointer items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600'
class='w-28 flex h-8 cursor-pointer items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 px-4 py-2 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600'
href='/signup'
>
<span>Sign Up</span>
Expand All @@ -53,12 +55,12 @@ import AccountDropdown from './AccountDropdown.astro';

<!-- Mobile Navigation Items -->
<div
class='fixed top-0 bottom-0 left-0 right-0 z-40 flex hidden items-center bg-slate-900'
class='fixed bottom-0 left-0 right-0 top-0 z-40 flex hidden items-center bg-slate-900'
data-mobile-nav
>
<button
data-close-mobile-nav
class='absolute top-6 right-6 block cursor-pointer text-gray-400 hover:text-gray-50'
class='absolute right-6 top-6 block cursor-pointer text-gray-400 hover:text-gray-50'
aria-label='Close Menu'
>
<Icon icon='close' />
Expand Down

0 comments on commit aece5a4

Please sign in to comment.