Refactor routing to dashboard with country parameter adjustment

This commit is contained in:
HolgerHatGarKeineNode
2025-11-22 23:02:26 +01:00
parent 5a30d38413
commit ff2a5636f6
9 changed files with 17 additions and 13 deletions

View File

@@ -99,14 +99,14 @@
class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
<flux:sidebar.toggle class="lg:hidden" icon="x-mark"/>
<a href="{{ route_with_country('dashboard') }}" class="ms-1 flex items-center space-x-2 rtl:space-x-reverse"
<a href="{{ route('dashboard', ['country' => 'de']) }}" class="ms-1 flex items-center space-x-2 rtl:space-x-reverse"
wire:navigate>
<x-app-logo/>
</a>
<flux:navlist variant="outline">
<flux:navlist.group :heading="__('Platform')">
<flux:navlist.item icon="layout-grid" :href="route_with_country('dashboard')"
<flux:navlist.item icon="layout-grid" :href="route('dashboard', ['country' => 'de'])"
:current="request()->routeIs('dashboard')" wire:navigate>
{{ __('Dashboard') }}
</flux:navlist.item>

View File

@@ -17,7 +17,7 @@
<flux:navlist variant="outline">
<flux:navlist.group :heading="__('App')" class="grid">
<flux:navlist.item icon="home" :href="route_with_country('dashboard')"
<flux:navlist.item icon="home" :href="route('dashboard', 'de')"
:current="request()->routeIs('dashboard')"
wire:navigate>{{ __('Dashboard') }}</flux:navlist.item>
</flux:navlist.group>

View File

@@ -6,7 +6,7 @@
<body class="min-h-screen bg-neutral-100 antialiased dark:bg-linear-to-b dark:from-neutral-950 dark:to-neutral-900">
<div class="bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
<div class="flex w-full max-w-md flex-col gap-6">
<a href="{{ route_with_country('dashboard') }}" class="flex flex-col items-center gap-2 font-medium" wire:navigate>
<a href="{{ route('dashboard', ['country' => 'de']) }}" class="flex flex-col items-center gap-2 font-medium" wire:navigate>
<span class="flex h-9 w-9 items-center justify-center rounded-md">
<x-app-logo-icon class="size-9 fill-current text-black dark:text-white" />
</span>

View File

@@ -27,7 +27,7 @@
</div>
<div class="w-full lg:p-8">
<div class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<a href="{{ route_with_country('dashboard') }}" class="z-20 flex flex-col items-center gap-2 font-medium lg:hidden" wire:navigate>
<a href="{{ route('dashboard', ['country' => 'de']) }}" class="z-20 flex flex-col items-center gap-2 font-medium lg:hidden" wire:navigate>
<span class="flex h-9 w-9 items-center justify-center rounded-md">
<x-app-logo-icon class="size-9 fill-current text-black dark:text-white" />
</span>

View File

@@ -32,7 +32,7 @@ class extends Component {
session(['auth.password_confirmed_at' => time()]);
$this->redirectIntended(default: route_with_country('dashboard', absolute: false), navigate: true);
$this->redirectIntended(default: route('dashboard', ['country' => 'de'], absolute: false), navigate: true);
}
}; ?>

View File

@@ -63,8 +63,10 @@ class extends Component {
if ($user) {
Auth::loginUsingId($user->id);
Session::regenerate();
$this->redirectIntended(default: route('dashboard', ['country' => 'de'], absolute: false),
navigate: true);
$this->redirectIntended(
default: route('dashboard', ['country' => 'de'], absolute: false),
navigate: true,
);
return;
}
return;
@@ -84,8 +86,10 @@ class extends Component {
RateLimiter::clear($this->throttleKey());
Session::regenerate();
$this->redirectIntended(default: route('dashboard', ['country' => 'de'], absolute: false),
navigate: true);
$this->redirectIntended(
default: route('dashboard', ['country' => 'de'], absolute: false),
navigate: true
);
}
/**

View File

@@ -35,7 +35,7 @@ class extends Component {
Auth::login($user);
$this->redirectIntended(route_with_country('dashboard', absolute: false), navigate: true);
$this->redirectIntended(route('dashboard', ['country' => 'de'],absolute: false), navigate: true);
}
}; ?>

View File

@@ -17,7 +17,7 @@ class extends Component {
public function sendVerification(): void
{
if (Auth::user()->hasVerifiedEmail()) {
$this->redirectIntended(default: route_with_country('dashboard', absolute: false), navigate: true);
$this->redirectIntended(default: route('dashboard', ['country' => 'de'],absolute: false), navigate: true);
return;
}

View File

@@ -64,7 +64,7 @@ class extends Component {
$user = Auth::user();
if ($user->hasVerifiedEmail()) {
$this->redirectIntended(default: route_with_country('dashboard', absolute: false));
$this->redirectIntended(default: route('dashboard', ['country' => 'de'],absolute: false));
return;
}