website: fix main site not rendering because <BrowserOnly>

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-19 19:23:21 +02:00
parent b75feab709
commit 8f00d73512
3 changed files with 28 additions and 15 deletions

View File

@ -14333,6 +14333,14 @@
"use-latest": "^1.0.0" "use-latest": "^1.0.0"
} }
}, },
"react-toggle": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/react-toggle/-/react-toggle-4.1.2.tgz",
"integrity": "sha512-4Ohw31TuYQdhWfA6qlKafeXx3IOH7t4ZHhmRdwsm1fQREwOBGxJT+I22sgHqR/w8JRdk+AeMCJXPImEFSrNXow==",
"requires": {
"classnames": "^2.2.5"
}
},
"readable-stream": { "readable-stream": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",

View File

@ -19,7 +19,8 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-before-after-slider": "^1.0.4", "react-before-after-slider": "^1.0.4",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-feather": "^2.0.9" "react-feather": "^2.0.9",
"react-toggle": "^4.1.2"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [

View File

@ -104,13 +104,15 @@ function Home() {
<div className="col col--5"> <div className="col col--5">
<div> <div>
<BrowserOnly> <BrowserOnly>
<BeforeAfterSlider {() => {
return <BeforeAfterSlider
className={styles.featureImage} className={styles.featureImage}
before={useBaseUrl("img/screen_apps_light.jpg")} before={useBaseUrl("img/screen_apps_light.jpg")}
after={useBaseUrl("img/screen_apps_dark.jpg")} after={useBaseUrl("img/screen_apps_dark.jpg")}
width={640} width={640}
height={480} height={480}
/> />
}}
</BrowserOnly> </BrowserOnly>
</div> </div>
</div> </div>
@ -143,13 +145,15 @@ function Home() {
<div className="col col--5"> <div className="col col--5">
<div> <div>
<BrowserOnly> <BrowserOnly>
<BeforeAfterSlider {() => {
return <BeforeAfterSlider
className={styles.featureImage} className={styles.featureImage}
before={useBaseUrl("img/screen_admin_light.jpg")} before={useBaseUrl("img/screen_admin_light.jpg")}
after={useBaseUrl("img/screen_admin_dark.jpg")} after={useBaseUrl("img/screen_admin_dark.jpg")}
width={640} width={640}
height={480} height={480}
/> />
}}
</BrowserOnly> </BrowserOnly>
</div> </div>
</div> </div>