Skip to content

Commit

Permalink
update frontend navbar links
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshKisb committed Sep 6, 2024
1 parent de5eb98 commit ae7e37a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/views/livewire/navigation.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header class="flex flex-wrap md:justify-start md:flex-nowrap z-50 w-full bg-blue-600">
<nav class="relative max-w-[66rem] w-full md:flex md:items-center md:justify-between md:gap-3 mx-auto px-4 sm:px-6 lg:px-8 py-2">
<div class="flex items-center justify-between">
<a class="flex-none font-semibold text-xl text-white focus:outline-none focus:opacity-80" href="#" aria-label="Brand"> {{ config('app.name') }} </a>
<a class="flex-none font-semibold text-xl text-white focus:outline-none focus:opacity-80" href="{{ url('/') }}" aria-label="Brand"> {{ config('app.name') }} </a>

<div class="md:hidden">
<button type="button" class="hs-collapse-toggle relative size-9 flex justify-center items-center text-sm font-semibold rounded-lg border border-white/50 text-white hover:bg-white/10 focus:outline-none focus:bg-white/10 disabled:opacity-50 disabled:pointer-events-none" id="hs-base-header-collapse" aria-expanded="false" aria-controls="hs-base-header" aria-label="Toggle navigation" data-hs-collapse="#hs-base-header">
Expand All @@ -22,11 +22,11 @@
@if (auth()->check())
@php
$user = auth()->user();
$role = $user->getRoleNames()->first() ?? 'user';
$dashboardUrl = $role === 'admin' ? '/admin' : '/' . $role;
$role = $user->hasRole('admin') ? 'admin' : 'user';
$dashboardUrl = $role === 'admin' ? '/admin' : '/app';
@endphp

<a href="{{ url('admin') }}"
<a href="{{ url($dashboardUrl) }}"
class="p-2 w-full flex items-center text-sm text-white/80 hover:text-white focus:outline-none focus:text-white">
<svg class="shrink-0 size-4 me-3 md:me-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
<path d="M5 3a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5Zm14 18a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4ZM5 11a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2H5Zm14 2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4Z"/>
Expand Down

0 comments on commit ae7e37a

Please sign in to comment.