diff --git a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx index d10c450c1..52966ac9c 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GeneralPage/index.tsx @@ -41,12 +41,23 @@ import { } from "../../../../types/components"; import { gradients } from "../../../../utils/styleUtils"; import { useStoreStore } from "../../../../stores/storeStore"; +import { useParams } from "react-router-dom"; export default function GeneralPage() { const setCurrentFlowId = useFlowsManagerStore( (state) => state.setCurrentFlowId, ); + const { scrollId } = useParams(); + + useEffect(() => { + const element = document.getElementById(scrollId ?? "null"); + if (element) { + // 👇 Will scroll smoothly to the top of the next section + element.scrollIntoView({ behavior: "smooth" }); + } + }, [scrollId]); + const [inputState, setInputState] = useState( CONTROL_PATCH_USER_STATE, ); @@ -272,9 +283,9 @@ export default function GeneralPage() { handleSaveKey(); }} > - + - API Key + Store API Key {(hasApiKey && !validApiKey ? INVALID_API_KEY diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 3b4612281..f105c8c86 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -180,24 +180,21 @@ export default function StorePage(): JSX.Element { title={STORE_TITLE} description={STORE_DESC} button={ - <> - {StoreApiKeyModal && ( - - - + } >
diff --git a/src/frontend/src/routes.tsx b/src/frontend/src/routes.tsx index 49b905f41..d49e035f7 100644 --- a/src/frontend/src/routes.tsx +++ b/src/frontend/src/routes.tsx @@ -56,7 +56,7 @@ const Router = () => { > } /> } /> - } /> + } /> } /> { } /> - element= - { - - - - } - /> - } + + + + } + />