Skip to content

Commit

Permalink
update header
Browse files Browse the repository at this point in the history
  • Loading branch information
tungphan1011 committed Nov 5, 2023
1 parent d254749 commit 62dfa81
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions frontend/my-app/src/routes/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,27 @@
});
}
}
</script>

<!-- ======= Header ======= -->
<Navbar
class="px-2 sm:px-4 py-2.5 fixed z-20 top-0 left-0 border-b md:flex md:justify-start"
>
>
{#if jwtData.role == "Customer"|| jwtData.role == ""}
<NavBrand href="/">
<img src={headerImage} class="mr-3 h-6 lg:h-20" alt="Ademy Logo" />
</NavBrand>
{:else if jwtData.role == "STAFF"}
<NavBrand href="/staff">
<img src={headerImage} class="mr-3 h-6 lg:h-20" alt="Ademy Logo" />
</NavBrand>
{:else}
<NavBrand href="/instructor">
<img src={headerImage} class="mr-3 h-6 lg:h-20" alt="Ademy Logo" />
</NavBrand>
{/if}

<div class="flex">
<div class="hidden relative md:block">
<div
Expand All @@ -112,9 +124,14 @@
<NavHamburger />
</div>
<NavUl>
<NavLi href="/teaching">Assign Instructor</NavLi>
<NavLi href="/mylearning">My Learning</NavLi>
<NavLi href="/cart">Your Cart</NavLi>
{#if jwtData.role=="CUSTOMER"}
<NavLi href="/mylearning">My Learning</NavLi>
<NavLi href="/cart">Your Cart</NavLi>
{:else }
<NavLi href="/teaching">Assign Instructor</NavLi>
{/if}


</NavUl>
<div class="ml-20 w-20">
{#if status === true}
Expand Down

0 comments on commit 62dfa81

Please sign in to comment.