Skip to content

Commit

Permalink
Use getCurrentPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Aug 19, 2024
1 parent 2d3cead commit c3b5866
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Http/Livewire/Auth/PasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PasswordReset extends Page implements HasForms
public function mount(): void
{
if (Filament::auth()->check()) {
redirect()->intended(Filament::getUrl());
redirect()->intended(Filament::getCurrentPanel()->getUrl());
}

if (session('status')) {
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/Auth/RequestPasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RequestPasswordReset extends Page implements HasForms
public function mount(): void
{
if (Filament::auth()->check()) {
redirect()->intended(Filament::getUrl());
redirect()->intended(Filament::getCurrentPanel()->getUrl());
}

if (session('status')) {
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Responses/LoginResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public function toResponse($request)
{
return $request->wantsJson()
? response()->json(['two_factor' => false])
: redirect()->intended(Filament::getUrl());
: redirect()->intended(Filament::getCurrentPanel()->getUrl());
}
}
2 changes: 1 addition & 1 deletion src/Http/Responses/TwoFactorChallengeViewResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class TwoFactorChallengeViewResponse implements LoginResponseContract
*/
public function toResponse($request)
{
return redirect()->intended(Filament::getUrl());
return redirect()->intended(Filament::getCurrentPanel()->getUrl());
}
}
2 changes: 1 addition & 1 deletion src/Http/Responses/TwoFactorLoginResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class TwoFactorLoginResponse implements LoginResponseContract
*/
public function toResponse($request)
{
return redirect()->intended(Filament::getUrl());
return redirect()->intended(Filament::getCurrentPanel()->getUrl());
}
}

0 comments on commit c3b5866

Please sign in to comment.