Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ziggy current method to check active link #402

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions stubs/inertia/resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<!-- Navigation Links -->
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
<jet-nav-link :href="route('dashboard')" :active="$page.currentRouteName == 'dashboard'">
<jet-nav-link :href="route('dashboard')" :active="route().current('dashboard')">
Dashboard
</jet-nav-link>
</div>
Expand Down Expand Up @@ -118,7 +118,7 @@
<!-- Responsive Navigation Menu -->
<div :class="{'block': showingNavigationDropdown, 'hidden': ! showingNavigationDropdown}" class="sm:hidden">
<div class="pt-2 pb-3 space-y-1">
<jet-responsive-nav-link :href="route('dashboard')" :active="$page.currentRouteName == 'dashboard'">
<jet-responsive-nav-link :href="route('dashboard')" :active="route().current('dashboard')">
Dashboard
</jet-responsive-nav-link>
</div>
Expand All @@ -137,11 +137,11 @@
</div>

<div class="mt-3 space-y-1">
<jet-responsive-nav-link :href="route('profile.show')" :active="$page.currentRouteName == 'profile.show'">
<jet-responsive-nav-link :href="route('profile.show')" :active="route().current('profile.show')">
Profile
</jet-responsive-nav-link>

<jet-responsive-nav-link :href="route('api-tokens.index')" :active="$page.currentRouteName == 'api-tokens.index'" v-if="$page.jetstream.hasApiFeatures">
<jet-responsive-nav-link :href="route('api-tokens.index')" :active="route().current('api-tokens.index')" v-if="$page.jetstream.hasApiFeatures">
API Tokens
</jet-responsive-nav-link>

Expand All @@ -161,11 +161,11 @@
</div>

<!-- Team Settings -->
<jet-responsive-nav-link :href="route('teams.show', $page.user.current_team)" :active="$page.currentRouteName == 'teams.show'">
<jet-responsive-nav-link :href="route('teams.show', $page.user.current_team)" :active="route().current('teams.show')">
Team Settings
</jet-responsive-nav-link>

<jet-responsive-nav-link :href="route('teams.create')" :active="$page.currentRouteName == 'teams.create'">
<jet-responsive-nav-link :href="route('teams.create')" :active="route().current('teams.create')">
Create New Team
</jet-responsive-nav-link>

Expand Down