mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
remove the quick theme switcher if admin settings are overridden
This commit is contained in:
@@ -146,6 +146,7 @@ export function Header({ hasSidebar = true }) {
|
||||
}
|
||||
|
||||
function UserMenu() {
|
||||
const { adminOverride } = useBknd();
|
||||
const auth = useAuth();
|
||||
const [navigate] = useNavigate();
|
||||
const { logout_route } = useBkndWindowContext();
|
||||
@@ -170,7 +171,9 @@ function UserMenu() {
|
||||
items.push({ label: `Logout ${auth.user.email}`, onClick: handleLogout, icon: IconKeyOff });
|
||||
}
|
||||
|
||||
if (!adminOverride) {
|
||||
items.push(() => <UserMenuThemeToggler />);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user