Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 8, 2023
1 parent 2c9cbb2 commit 99abdc5
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function HomepageHeader() {
const {siteConfig, i18n} = useDocusaurusContext();
const shanghaiTimezone = new Date().getTimezoneOffset() === -480;
const enLanguage = i18n.currentLocale === 'en-us';
const alwaysShowCloudService = window.location.href.indexOf('cloud=1') > 0;
const alwaysShowCloudService = window?.location?.href?.indexOf('cloud=1') > 0;

React.useEffect(() => {
console.log(`?cloud=1 to show cloud service, current: ${alwaysShowCloudService}`);
Expand Down Expand Up @@ -51,17 +51,15 @@ function HomepageHeader() {

export default function Home() {
return (
<BrowserOnly>
<Layout
title={`SRS (Simple Realtime Server)`}
description={translate({id: 'homepage.subTitle'})}
>
<HomepageHeader/>
<main>
<HomepageFeatures/>
</main>
<img src='https://ossrs.net/gif/v1/sls.gif?site=ossrs.io&path=/lts/index'/>
</Layout>
</BrowserOnly>
<Layout
title={`SRS (Simple Realtime Server)`}
description={translate({id: 'homepage.subTitle'})}
>
<HomepageHeader/>
<main>
<HomepageFeatures/>
</main>
<img src='https://ossrs.net/gif/v1/sls.gif?site=ossrs.io&path=/lts/index'/>
</Layout>
);
}

0 comments on commit 99abdc5

Please sign in to comment.