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. -->
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTheme } from "../contexts/ThemeContext";
|
||||
import { ProviderSettingsGrid } from "@/components/ProviderSettings";
|
||||
import ConfirmationDialog from "@/components/ConfirmationDialog";
|
||||
@@ -26,6 +26,8 @@ import { NeonIntegration } from "@/components/NeonIntegration";
|
||||
import { RuntimeModeSelector } from "@/components/RuntimeModeSelector";
|
||||
import { NodePathSelector } from "@/components/NodePathSelector";
|
||||
import { ToolsMcpSettings } from "@/components/settings/ToolsMcpSettings";
|
||||
import { useSetAtom } from "jotai";
|
||||
import { activeSettingsSectionAtom } from "@/atoms/viewAtoms";
|
||||
|
||||
export default function SettingsPage() {
|
||||
const [isResetDialogOpen, setIsResetDialogOpen] = useState(false);
|
||||
@@ -33,6 +35,11 @@ export default function SettingsPage() {
|
||||
const appVersion = useAppVersion();
|
||||
const { settings, updateSettings } = useSettings();
|
||||
const router = useRouter();
|
||||
const setActiveSettingsSection = useSetAtom(activeSettingsSectionAtom);
|
||||
|
||||
useEffect(() => {
|
||||
setActiveSettingsSection("general-settings");
|
||||
}, [setActiveSettingsSection]);
|
||||
|
||||
const handleResetEverything = async () => {
|
||||
setIsResetting(true);
|
||||
|
||||
Reference in New Issue
Block a user