import Panel from 'components/ui/Panel' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' import { BASE_PATH, LOCAL_STORAGE_KEYS } from 'lib/constants' import { useTheme } from 'next-themes' import { useEffect, useState } from 'react' import SVG from 'react-inlinesvg' import { Label_Shadcn_, RadioGroup_Shadcn_, RadioGroupLargeItem_Shadcn_, Separator, singleThemes, Switch, Theme, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' const ThemeSettings = () => { const [mounted, setMounted] = useState(false) const { theme, setTheme } = useTheme() const [allowNavPanelToExpand, setAllowNavPanelToExpand] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.EXPAND_NAVIGATION_PANEL, true ) const [expandNavigationPanel, setExpandNavigationPanel] = useState(allowNavPanelToExpand) /** * Avoid Hydration Mismatch * https://github.com/pacocoursey/next-themes?tab=readme-ov-file#avoid-hydration-mismatch */ // useEffect only runs on the client, so now we can safely show the UI useEffect(() => { setMounted(true) }, []) if (!mounted) { return null } function SingleThemeSelection() { return (
) } function handleExpandNavigationPanel() { setExpandNavigationPanel(!expandNavigationPanel) setAllowNavPanelToExpand(!allowNavPanelToExpand) } return (Choose how Supabase looks to you. Select a single theme, or sync with your system.
Supabase will use your selected theme