import { useStore } from "jotai"; import { useEffect, useState } from "react"; import { SETTINGS_TAB_PROXY, SettingsContent } from "../components/Settings"; import { syncProxyState } from "../lib/store"; /** * Dev only: the settings window over the fixture backend, at the dialog's size. Open * `/harness.html?settings&theme=dark`; `&tab=general` opens another tab than Proxy. */ export function SettingsHarness() { const store = useStore(); const [synced, setSynced] = useState(false); useEffect(() => { syncProxyState(store); setSynced(true); }, [store]); const tab = new URLSearchParams(location.search).get("tab") ?? SETTINGS_TAB_PROXY; if (!synced) return null; return (
); }