From 702609da1ef579b7d05ea1311badeac2e186b412 Mon Sep 17 00:00:00 2001 From: elvira Date: Tue, 3 Nov 2026 00:02:34 +0200 Subject: [PATCH] Header: account and wishlist links no longer depend on login Both links are now the same for every visitor, so the header can be cached: - Account always goes to route('account'); the auth middleware sends guests to login, and after login they land back on the account page (url.intended) instead of home. - Wishlist always goes to route('wishlist'); WishlistController::guest already redirects logged-in users to account.wishlist. - One neutral label, storefront.nav.account, on desktop and mobile. header.blade.php no longer calls auth(). Co-Authored-By: Claude Opus 5.5 --- resources/views/components/header.blade.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/resources/views/components/header.blade.php b/resources/views/components/header.blade.php index b418dcf..9adb446 100644 --- a/resources/views/components/header.blade.php +++ b/resources/views/components/header.blade.php @@ -45,9 +45,10 @@ @endforeach - {{-- Wishlist — the account page, or the cookie-based guest page --}} + {{-- Wishlist — always the guest page, which sends logged-in users on + to the account version, so the header doesn't depend on login --}} - {{-- Account — the account page, or login for guests. [data-account-link] - is the island target shared with the mobile menu's link. --}} + {{-- Account — always the account page; the auth middleware sends + guests to login. [data-account-link] is the island target shared + with the mobile menu's link. --}} @@ -180,7 +182,7 @@ class="mobile-menu fixed inset-x-0 top-20 bottom-auto m-0 max-h-[calc(100dvh-5re