fix: force default light mode for public pages and admin
- Set defaultColorScheme='light' in root MantineProvider - Change darkModeStore default from system preference to false (light) - Add MantineProvider with light theme to darmasaba/layout.tsx - Remove dark mode dependency from ModuleView component - Prevent system color scheme from affecting initial page load This ensures consistent light mode on first visit for both public pages and admin panel, regardless of OS settings. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -10,8 +10,7 @@ import {
|
||||
SimpleGrid,
|
||||
Skeleton,
|
||||
Stack,
|
||||
Text,
|
||||
useMantineColorScheme
|
||||
Text
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { Prisma } from "@prisma/client";
|
||||
@@ -24,8 +23,6 @@ type ProgramInovasiItem = Prisma.ProgramInovasiGetPayload<{ include: { image: tr
|
||||
|
||||
function ModuleItem({ data }: { data: ProgramInovasiItem }) {
|
||||
const router = useTransitionRouter();
|
||||
const { colorScheme } = useMantineColorScheme();
|
||||
const isDark = colorScheme === "dark";
|
||||
|
||||
return (
|
||||
<motion.div whileHover={{ scale: 1.03 }}>
|
||||
@@ -37,7 +34,7 @@ function ModuleItem({ data }: { data: ProgramInovasiItem }) {
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
className="cursor-pointer transition-all"
|
||||
bg={isDark ? "dark.6" : "white"}
|
||||
bg="white"
|
||||
>
|
||||
<Center h={160}>
|
||||
{data.image?.link ? (
|
||||
|
||||
Reference in New Issue
Block a user