Theme doesn't apply on dashboard page
Hello, im having some odd interaction with filament and themes.
My theme is applying and has been applying well since v2.
Every page applies the correct color, but for some reason when I get to the dashboard page, the color changes back to filament's default one. Has anyone had the same issue or does anyone have a possible solution to this problem?
6 Replies
Did you set the colors via
->colors()
on the Panel provider?Hello, yes I did.
It is only happening when im in the Dashboard, in any other page or resource it applies the primary color that was set. In the dashboard it defaults to using filament's default primary color.
Hm. That sounds really weird.
Indeed, I have no clue why this happened all of a sudden.
Found the issue. I was redirecting users on their first login ever to the profile page and the ones that had login before to the dashboard page. This was applying the default filament styles. This fixes the issue I had with filament styles but now I don't have an asnwer for the solution I implemented for users to be redirected because using the route will just apply the filament's default styles. This is what was causing the issue. If anyone has any clue how can i still make this route work without having to change the styles, ill glady appreaciate.
Using has the same result
Solved this issue aswell. For anyone that goes through the same, in order to manage where to redirect the user after login, I had a customFilamentLogin class set on . In this class I overwrote the authenticate method to update the last_login_at column and I also then created a CustomLoginResponse:class extending filament's LoginResponse and I overwrote the toResponse method and just managed where the user should be redirected to
Glad you figured this out. Still weird that the redirect messes with the config 🤔