import { Popover, ActionIcon, Fieldset, Checkbox, Stack } from "@mantine/core"; import { IconSettings } from "@tabler/icons-react"; import { FC } from "react"; import { useAppDispatch, useAppSelector } from "../state/hooks"; import { updateSettings } from "../state/settingsSlice"; const SettingsMenu: FC = () => { const { useLocalTime, enableQueryHistory, enableAutocomplete, enableSyntaxHighlighting, enableLinter, showAnnotations, } = useAppSelector((state) => state.settings); const dispatch = useAppDispatch(); return (
dispatch( updateSettings({ useLocalTime: event.currentTarget.checked }) ) } />
dispatch( updateSettings({ enableQueryHistory: event.currentTarget.checked, }) ) } /> dispatch( updateSettings({ enableAutocomplete: event.currentTarget.checked, }) ) } /> dispatch( updateSettings({ enableSyntaxHighlighting: event.currentTarget.checked, }) ) } /> dispatch( updateSettings({ enableLinter: event.currentTarget.checked, }) ) } />
dispatch( updateSettings({ showAnnotations: event.currentTarget.checked, }) ) } />
); }; export default SettingsMenu;