From 8df7f9f9bf659aff188f6834c1dae048d79eba32 Mon Sep 17 00:00:00 2001 From: bufan Date: Wed, 31 Jan 2024 16:18:58 +0800 Subject: [PATCH] reconstruct nav and styles --- packages/client/dashboard/src/App.tsx | 2 +- packages/client/dashboard/src/hooks/useGuideSteps.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/dashboard/src/App.tsx b/packages/client/dashboard/src/App.tsx index e54a361..6a31fca 100644 --- a/packages/client/dashboard/src/App.tsx +++ b/packages/client/dashboard/src/App.tsx @@ -171,7 +171,7 @@ function BuildLayout () { const [selectModel, setSelectModel] = useState() const [selectComposite, setSelectComposite] = useState() const { pathname } = useLocation() - const defaultKey = pathname.split('/explore/')[1] + const defaultKey = pathname.split('/build/')[1] const PAGES = [ { id: 'editor', diff --git a/packages/client/dashboard/src/hooks/useGuideSteps.ts b/packages/client/dashboard/src/hooks/useGuideSteps.ts index b576d50..d04e70f 100644 --- a/packages/client/dashboard/src/hooks/useGuideSteps.ts +++ b/packages/client/dashboard/src/hooks/useGuideSteps.ts @@ -100,28 +100,28 @@ export function useGuideStepsState(dapps: ClientDApp[], loadingDApps: boolean) { useEffect(() => { if (!validStep(1)) { if (!validStep2SubStep(0)) { - const isModelEditor = location.pathname.endsWith('model-editor') + const isModelEditor = location.pathname.endsWith('editor') if (isModelEditor) { completeStep2SubStep(0) } } if (!validStep2SubStep(1)) { - const isModelPlayground = location.pathname.endsWith('model-playground') + const isModelPlayground = location.pathname.endsWith('playground') if (isModelPlayground) { completeStep2SubStep(1) } } if (!validStep2SubStep(2)) { - const isModelSdk = location.pathname.endsWith('model-sdk') + const isModelSdk = location.pathname.endsWith('sdk') if (isModelSdk) { completeStep2SubStep(2) } } if (!validStep2SubStep(3)) { - const isStatistic = location.pathname.endsWith('statistic') + const isStatistic = location.pathname.endsWith('metrics') if (isStatistic) { completeStep2SubStep(3) }