From 6dabc643817ecc4ece23bc1c71c02ba4b35910ca Mon Sep 17 00:00:00 2001 From: zjy <3161362058@qq.com> Date: Fri, 6 Sep 2024 17:02:30 +0800 Subject: [PATCH] update docs --- docs/website/src/hooks/useWindow.ts | 3 ++- docs/website/src/pages/components/Header/index.tsx | 4 ++-- docs/website/src/pages/index.tsx | 3 +++ docs/website/src/pages/self-hosting/index.tsx | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/website/src/hooks/useWindow.ts b/docs/website/src/hooks/useWindow.ts index 45cba0d185f9..9a1a6aa628c1 100644 --- a/docs/website/src/hooks/useWindow.ts +++ b/docs/website/src/hooks/useWindow.ts @@ -4,6 +4,7 @@ import useIsBrowser from '@docusaurus/useIsBrowser'; interface SemParams { bd_vid: string; keywords: string; + s: string; } export default function useWindow() { @@ -13,7 +14,7 @@ export default function useWindow() { isBrowser ? document.documentElement.lang : 'en' ); const [cloudUrl, setCloudUrl] = useState('https://cloud.sealos.io'); - const [semParams, setSemParams] = useState({ bd_vid: '', keywords: '' }); + const [semParams, setSemParams] = useState({ bd_vid: '', keywords: '', s: '' }); useEffect(() => { if (!isBrowser) return; diff --git a/docs/website/src/pages/components/Header/index.tsx b/docs/website/src/pages/components/Header/index.tsx index 22d5fda046fd..d11a8eefc8fd 100644 --- a/docs/website/src/pages/components/Header/index.tsx +++ b/docs/website/src/pages/components/Header/index.tsx @@ -142,7 +142,7 @@ const HomeHeader = ({ isPc }: { isPc: boolean }) => { )} {i18nObj.startNow} @@ -201,7 +201,7 @@ const HomeHeader = ({ isPc }: { isPc: boolean }) => { )} {i18nObj.startNow} diff --git a/docs/website/src/pages/index.tsx b/docs/website/src/pages/index.tsx index 8e5de39ea4fc..7e5c5ebef252 100644 --- a/docs/website/src/pages/index.tsx +++ b/docs/website/src/pages/index.tsx @@ -50,6 +50,9 @@ const Home = () => { const k = urlParams.get('k'); if (k) params.keywords = k; + const s = urlParams.get('s'); + if (s) params.s = s; + if (Object.keys(params).length > 0) { sessionStorage.setItem('sealos_sem', JSON.stringify(params)); } diff --git a/docs/website/src/pages/self-hosting/index.tsx b/docs/website/src/pages/self-hosting/index.tsx index 15e316a725b4..80b9be8f4c0c 100644 --- a/docs/website/src/pages/self-hosting/index.tsx +++ b/docs/website/src/pages/self-hosting/index.tsx @@ -27,6 +27,9 @@ export default function Pricing() { const k = urlParams.get('k'); if (k) params.keywords = k; + const s = urlParams.get('s'); + if (s) params.s = s; + if (Object.keys(params).length > 0) { sessionStorage.setItem('sealos_sem', JSON.stringify(params)); }