Skip to content

Commit ea80afd

Browse files
authored
add: warning for redirect in nav items
1 parent 377141f commit ea80afd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

config/filament-flexible-content-block-pages.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,16 @@
5959
Authenticate::class,
6060
],
6161
'navigation_items' => [
62-
NavigationItem::make(fn () => flexiblePagesTrans('panel.navigation_items.go_to_website_lbl'))
63-
->url('/')
64-
->openUrlInNewTab()
65-
->icon('heroicon-o-globe-alt')
66-
->sort(-100),
62+
// WARNING: Do not place redirect NavigationItems first in the array.
63+
// Filament automatically redirects to the first navigation item on panel load.
64+
// If that item is an external redirect (like the home route), users will be
65+
// bounced out of the panel, creating the appearance of authentication failure.
66+
//
67+
// NavigationItem::make(fn () => flexiblePagesTrans('panel.navigation_items.go_to_website_lbl'))
68+
// ->url('/')
69+
// ->openUrlInNewTab()
70+
// ->icon('heroicon-o-globe-alt')
71+
// ->sort(-100),
6772
],
6873
],
6974

0 commit comments

Comments
 (0)