import { Stack, Switch, useComputedColorScheme, useMantineColorScheme, } from "@mantine/core"; import { useForm } from "@mantine/form"; import { usePubSub } from "create-pubsub/react"; import { settingsPubSub } from "../../../../modules/pubSub"; export default function InterfaceSettingsForm() { const [settings, setSettings] = usePubSub(settingsPubSub); const form = useForm({ initialValues: settings, onValuesChange: setSettings, }); const { setColorScheme } = useMantineColorScheme(); const computedColorScheme = useComputedColorScheme("light"); const toggleColorScheme = () => { setColorScheme(computedColorScheme === "dark" ? "light" : "dark"); }; return ( ); }