-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(image-gallery): fix responsiveness #74
fix(image-gallery): fix responsiveness #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small findings
@@ -37,12 +38,20 @@ export const ImageGallery = ({ | |||
}) => { | |||
const [hovered, setHovered] = useState(false) | |||
const [hoveredImage, setHoveredImage] = useState<ImageType>() | |||
const mobile = useMediaQuery('(max-width:480px)') | |||
const web = useMediaQuery('(max-width:1023px)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be tab
|
||
const hoverImageFn = (image: ImageType) => { | ||
setHovered(true) | ||
setHoveredImage(image) | ||
} | ||
|
||
const getSlidesToShow = () => { | ||
if (mobile) return 1 | ||
else if (web) return 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for tab
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lftm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
responsiveness fix for number of images to show
Why
To enhance
Issue
Ref: CPLP-2811
Checklist
Please delete options that are not relevant.