mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): restore mobile back button on agent settings pages (#23752)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import type { FC } from "react";
|
||||
import { Outlet, useParams } from "react-router";
|
||||
import { Outlet, useLocation } from "react-router";
|
||||
import { AgentPageHeader } from "./components/AgentPageHeader";
|
||||
|
||||
const AgentSettingsPage: FC = () => {
|
||||
const { "*": section } = useParams();
|
||||
const location = useLocation();
|
||||
const match = location.pathname.match(/\/agents\/settings\/(.+)/);
|
||||
const section = match?.[1];
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
+1
-1
@@ -696,7 +696,7 @@ export const router = createBrowserRouter(
|
||||
>
|
||||
<Route index element={<AgentCreatePage />} />
|
||||
<Route path="settings" element={<AgentSettingsPage />}>
|
||||
<Route index element={<Navigate to="behavior" replace />} />
|
||||
<Route index element={<AgentSettingsBehaviorPage />} />
|
||||
<Route path="behavior" element={<AgentSettingsBehaviorPage />} />
|
||||
<Route path="providers" element={<AgentSettingsProvidersPage />} />
|
||||
<Route path="models" element={<AgentSettingsModelsPage />} />
|
||||
|
||||
Reference in New Issue
Block a user