diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Image/Image.tsx | 5 | ||||
-rw-r--r-- | src/components/PollsList/RenderItem.tsx | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/components/Image/Image.tsx b/src/components/Image/Image.tsx index 1898716..716736f 100644 --- a/src/components/Image/Image.tsx +++ b/src/components/Image/Image.tsx @@ -15,6 +15,9 @@ interface PropTypes { type Status = 'success' | 'loading' | 'error'; const useStyles = makeStyles(theme => ({ + image: { + imageOrientation: 'from-image' + }, container: { width: '100%', height: '100%', @@ -71,7 +74,7 @@ const Image: React.FC<PropTypes> = React.memo(({ <img src={src} alt={alt} - className={`${className} ${classes[status]}`} + className={`${classes.image} ${classes[status]} ${className}`} style={{ transition }} onLoad={handleLoad} onError={handleError} diff --git a/src/components/PollsList/RenderItem.tsx b/src/components/PollsList/RenderItem.tsx index 5123bca..beed259 100644 --- a/src/components/PollsList/RenderItem.tsx +++ b/src/components/PollsList/RenderItem.tsx @@ -35,7 +35,7 @@ const RenderItem: React.FC<PropTypes> = React.memo(({ }, [mutate, index, polls]); return ( - <div key={_key} style={style}> + <div key={`${_key}-${poll._id}`} style={style}> <PollCard poll={poll} setPoll={setPoll} /> </div> ); |