From 3a7541ca76c6be3593f439d24c1a8772ff63ac97 Mon Sep 17 00:00:00 2001 From: guofei Date: Fri, 25 Oct 2024 10:44:04 +0800 Subject: [PATCH] 1 --- src/app/components/Examples.tsx | 4 ++++ src/app/components/header.tsx | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/components/Examples.tsx b/src/app/components/Examples.tsx index 72419ec..a7f3235 100644 --- a/src/app/components/Examples.tsx +++ b/src/app/components/Examples.tsx @@ -11,6 +11,10 @@ export default function Examples(props: { dict: Record; lang: st const [examples, setExamples] = useState([]); useEffect(() => { + if (window.location.hash == "#/price") { + window.location.replace(`${window.location.origin}/price`); + return; + } const fetchData = async () => { const res = await fetch(`https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/example.json`); const dataSource = await res.json(); diff --git a/src/app/components/header.tsx b/src/app/components/header.tsx index 33f089d..7360eb3 100644 --- a/src/app/components/header.tsx +++ b/src/app/components/header.tsx @@ -120,7 +120,7 @@ export default function Header(props: { dict: Record; lang: stri /> { -
setShow(false)}> +
setShow(false)}>
; lang: stri }
-
setShow(false)}>
); }