Skip to content

Commit

Permalink
Fix SSR on website
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinH committed May 18, 2020
1 parent 1ce04c1 commit 16bcba0
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions docs/src/components/Demo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Button from '@material-ui/core/Button'
import NoSsr from '@material-ui/core/NoSsr'
import Slider from '@material-ui/core/Slider'
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
Expand Down Expand Up @@ -84,17 +85,19 @@ const Demo: React.FC = props => {
return (
<div>
<div className={classes.cropContainer}>
<Cropper
image={dogImg}
crop={crop}
rotation={rotation}
zoom={zoom}
aspect={4 / 3}
onCropChange={setCrop}
onRotationChange={setRotation}
onCropComplete={onCropComplete}
onZoomChange={setZoom}
/>
<NoSsr>
<Cropper
image={dogImg}
crop={crop}
rotation={rotation}
zoom={zoom}
aspect={4 / 3}
onCropChange={setCrop}
onRotationChange={setRotation}
onCropComplete={onCropComplete}
onZoomChange={setZoom}
/>
</NoSsr>
</div>
<div className={classes.controls}>
<div className={classes.sliderContainer}>
Expand Down

0 comments on commit 16bcba0

Please sign in to comment.