Skip to content

Commit f7132d0

Browse files
authored
fix: unaligned settings (#1618)
# Description This is a small fix to make the settings aligned with the sidebar. It closes #1375 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Aligned the Settings page with the sidebar. The page now sets the active section to "general-settings" on mount, so the content matches the selected sidebar on first load. <!-- End of auto-generated description by cubic. -->
1 parent b22928d commit f7132d0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pages/settings.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from "react";
1+
import { useEffect, useState } from "react";
22
import { useTheme } from "../contexts/ThemeContext";
33
import { ProviderSettingsGrid } from "@/components/ProviderSettings";
44
import ConfirmationDialog from "@/components/ConfirmationDialog";
@@ -26,13 +26,20 @@ import { NeonIntegration } from "@/components/NeonIntegration";
2626
import { RuntimeModeSelector } from "@/components/RuntimeModeSelector";
2727
import { NodePathSelector } from "@/components/NodePathSelector";
2828
import { ToolsMcpSettings } from "@/components/settings/ToolsMcpSettings";
29+
import { useSetAtom } from "jotai";
30+
import { activeSettingsSectionAtom } from "@/atoms/viewAtoms";
2931

3032
export default function SettingsPage() {
3133
const [isResetDialogOpen, setIsResetDialogOpen] = useState(false);
3234
const [isResetting, setIsResetting] = useState(false);
3335
const appVersion = useAppVersion();
3436
const { settings, updateSettings } = useSettings();
3537
const router = useRouter();
38+
const setActiveSettingsSection = useSetAtom(activeSettingsSectionAtom);
39+
40+
useEffect(() => {
41+
setActiveSettingsSection("general-settings");
42+
}, [setActiveSettingsSection]);
3643

3744
const handleResetEverything = async () => {
3845
setIsResetting(true);

0 commit comments

Comments
 (0)