diff --git a/src/components/Settings/Sections/GeneralSettings.tsx b/src/components/Settings/Sections/GeneralSettings.tsx index c93998ee..4e276909 100644 --- a/src/components/Settings/Sections/GeneralSettings.tsx +++ b/src/components/Settings/Sections/GeneralSettings.tsx @@ -3,6 +3,7 @@ import SectionHeading from '../Elements/SectionHeading' import FieldWrapper from '../Elements/FieldWrapper' import { useSettings } from '../../../hooks/useSettings' import { ThemeOptions } from '../../../config/settings' +import * as Switch from '@radix-ui/react-switch' const GeneralSettings = () => { const [settings, setSettings] = useSettings() @@ -40,6 +41,27 @@ const GeneralSettings = () => { ))} + + + setSettings({ + ...settings, + general: { + ...generalSettings, + webpageContext: value, + }, + }) + } + className="cdx-w-[42px] cdx-h-[25px] cdx-bg-neutral-500 cdx-rounded-full cdx-relative data-[state=checked]:cdx-bg-blue-500 cdx-outline-none cdx-cursor-default" + > + + + ) } diff --git a/src/config/settings/index.ts b/src/config/settings/index.ts index 4330967f..c335af5b 100644 --- a/src/config/settings/index.ts +++ b/src/config/settings/index.ts @@ -35,6 +35,7 @@ export type Settings = { } general: { theme: ThemeOptions + webpageContext: boolean } } @@ -51,5 +52,6 @@ export const defaultSettings: Settings = { }, general: { theme: ThemeOptions.SYSTEM, + webpageContext: true, }, }