This commit is contained in:
estifanos
2026-08-19 10:22:00 +00:00
parent 4121e2a8b1
commit 0fa5566432
2 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ import {
Box, Box,
rem, rem,
Center, Center,
useMantineColorScheme, useComputedColorScheme,
} from '@mantine/core'; } from '@mantine/core';
import { import {
IconChevronRight, IconChevronRight,
@@ -58,7 +58,7 @@ function TreeNode({
const isSelected = selectedId === location.id; const isSelected = selectedId === location.id;
const hasChildren = const hasChildren =
Array.isArray(location.children) && location.children.length > 0; Array.isArray(location.children) && location.children.length > 0;
const { colorScheme } = useMantineColorScheme(); const colorScheme = useComputedColorScheme('light', { getInitialValueInEffect: true });
const hoverBg = colorScheme === 'dark' const hoverBg = colorScheme === 'dark'
? 'var(--mantine-color-dark-6)' ? 'var(--mantine-color-dark-6)'
: 'var(--mantine-color-gray-0)'; : 'var(--mantine-color-gray-0)';

View File

@@ -12,7 +12,7 @@ import {
Tooltip, Tooltip,
UnstyledButton, UnstyledButton,
rem, rem,
useMantineColorScheme, useComputedColorScheme,
} from '@mantine/core'; } from '@mantine/core';
import { useMediaQuery } from '@mantine/hooks'; import { useMediaQuery } from '@mantine/hooks';
import { import {
@@ -285,7 +285,7 @@ export function AppSidebar({
brandLogo, brandLogo,
}: AppSidebarProps) { }: AppSidebarProps) {
const { t } = useTranslation(); const { t } = useTranslation();
const { colorScheme } = useMantineColorScheme(); const colorScheme = useComputedColorScheme('light', { getInitialValueInEffect: true });
// The icon-rail toggle is a desktop-only affordance (its button is // The icon-rail toggle is a desktop-only affordance (its button is
// `visibleFrom="sm"`) — on mobile the sidebar renders in a full-width // `visibleFrom="sm"`) — on mobile the sidebar renders in a full-width
// drawer, so a `collapsed` state carried over from a prior desktop session // drawer, so a `collapsed` state carried over from a prior desktop session