diff --git a/frontend/src/components/footbar/FootBar.tsx b/frontend/src/components/footbar/FootBar.tsx index 5b0d11a..2cdaf60 100644 --- a/frontend/src/components/footbar/FootBar.tsx +++ b/frontend/src/components/footbar/FootBar.tsx @@ -23,13 +23,6 @@ const FootBar = () => { const [searchParams, setSearchParams] = useSearchParams() const onSelectionChange = (key: Key) => { - setSearchParams({ - ...parseSearchParams(searchParams), - logs_page: "closed", - settings: "closed", - }) - setSettingsPage(false) - setLogsPage(false) if (key === "Inspect") { setLogsPage(true) setSearchParams({ @@ -44,6 +37,24 @@ const FootBar = () => { logs_page: "closed", settings: "opened", }) + } else { + setSearchParams({ + ...parseSearchParams(searchParams), + logs_page: "closed", + settings: "closed", + }) + setSettingsPage(false) + setLogsPage(false) + } + } + + const findDefaultSelectedKey = () => { + if (settingsPage) { + return "Settings" + } else if (logsPage) { + return "Inspect" + } else { + return "Edit" } } @@ -54,6 +65,7 @@ const FootBar = () => {