I've got my OS set to dark mode. You page doesn't pick that up until I click on the profile icon in the sidebar menu. It's a bit confusing because I was expecting the profile accordion to open up. That happened but so did the the theme change.
You probably want to do the theme check/set on the load/mount of your dashboard container and not have it hooked into the profile button. Otherwise, the theme toggle button works correctly.
I've got my OS set to dark mode. You page doesn't pick that up until I click on the profile icon in the sidebar menu. It's a bit confusing because I was expecting the profile accordion to open up. That happened but so did the the theme change.
You probably want to do the theme check/set on the load/mount of your dashboard container and not have it hooked into the profile button. Otherwise, the theme toggle button works correctly.