Skip to content
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

Merged

Conversation

lavanya-bmw
Copy link
Contributor

@lavanya-bmw lavanya-bmw commented Nov 23, 2023

Description

responsiveness fix for number of images to show

Why

To enhance

Issue

Ref: CPLP-2811

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

Copy link
Contributor

@manojava-gk manojava-gk left a 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)')
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for tab

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@evegufy evegufy requested a review from Phil91 November 23, 2023 08:14
Copy link
Contributor

@manojava-gk manojava-gk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lftm

Copy link
Contributor

@nidhigarg-bmw nidhigarg-bmw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@evegufy evegufy changed the title fix(image-gallery): responsive fix fix(image-gallery): fix responsiveness Nov 23, 2023
@evegufy evegufy merged commit 5428ad0 into eclipse-tractusx:main Nov 23, 2023
5 checks passed
@lavanya-bmw lavanya-bmw deleted the update/CPLP-2811/image-gallery branch January 28, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants