From 8881dd6bd1b85a75ef10c384d83ad5b75dbbcc7d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 30 Sep 2024 07:17:19 +0000 Subject: [PATCH] remove custom color switch --- src/frontend/src/WirevizPanel.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/frontend/src/WirevizPanel.tsx b/src/frontend/src/WirevizPanel.tsx index f63a29c..285d5cc 100644 --- a/src/frontend/src/WirevizPanel.tsx +++ b/src/frontend/src/WirevizPanel.tsx @@ -1,8 +1,8 @@ import '@mantine/core/styles.css'; import { IconDotsVertical, IconTrash, IconUpload } from '@tabler/icons-react'; -import { ActionIcon, Alert, Anchor, Divider, Group, Image, MantineProvider, MantineTheme, Menu, Paper, SimpleGrid, Stack, Table, Text, Title, useMantineColorScheme } from "@mantine/core"; -import { StrictMode, useEffect, useMemo } from "react"; +import { ActionIcon, Alert, Anchor, Divider, Group, Image, MantineProvider, MantineTheme, Menu, Paper, SimpleGrid, Stack, Table, Text, Title } from "@mantine/core"; +import { StrictMode, useMemo } from "react"; import { createRoot } from "react-dom/client"; @@ -36,12 +36,6 @@ function WirevizBomRow({row}: {row: any}) { function WirevizPanel({context}: {context: any}) { - const { setColorScheme } = useMantineColorScheme(); - - useEffect(() => { - setColorScheme(context.colorScheme ?? 'light'); - }, [context.colorScheme]); - const wirevizContext = useMemo(() => context?.context ?? {}, [context]); const bomRows = useMemo(() => wirevizContext.wireviz_bom_data ?? [], [wirevizContext]);