Skip to content

Commit 395c1fe

Browse files
use browseronly
1 parent d21aa1d commit 395c1fe

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

website/src/pages/index.tsx

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@ import styles from "./index.module.css";
77
import HomepageFeatures from "../components/HomepageFeatures";
88
import LogoUrl from "@site/static/img/logo.png";
99
import UwuLogoUrl from "@site/static/img/uwulogo.png";
10+
import BrowserOnly from "@docusaurus/BrowserOnly";
1011

1112
function HomepageHeader() {
1213
const { siteConfig } = useDocusaurusContext();
13-
const uwu = window.location.search.includes("uwu");
1414

1515
return (
1616
<header className={clsx("hero hero--primary", styles.heroBanner)}>
1717
<div className="container">
18-
{uwu ? (
19-
<img alt="OC uwu logo" src={UwuLogoUrl} />
20-
) : (
21-
<h1 className="hero__title">{siteConfig.title}</h1>
22-
)}
18+
<BrowserOnly>
19+
{() =>
20+
window.location.search.includes("uwu") ? (
21+
<img alt="OC uwu logo" src={UwuLogoUrl} />
22+
) : (
23+
<h1 className="hero__title">{siteConfig.title}</h1>
24+
)
25+
}
26+
</BrowserOnly>
2327
<p className="hero__subtitle">{siteConfig.tagline}</p>
2428
<div className={styles.buttons}>
2529
<Link

0 commit comments

Comments
 (0)