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 MediaGallery to display selected variant images #373

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #366

Update MediaGallery component to display both product and variant images, prioritizing the selected variant's images.

  • Import useProductVariants and useSelectedVariant hooks in app/components/product/MediaGallery.tsx.
  • Concatenate variant images with product images and remove duplicate images based on Shopify CDN file URL.
  • Modify useSelectedVariant hook in app/hooks/useSelectedVariant.tsx to include images field for the selected variant.

Related to frontvibe#366

Update `MediaGallery` component to display both product and variant images, prioritizing the selected variant's images.

* Import `useProductVariants` and `useSelectedVariant` hooks in `app/components/product/MediaGallery.tsx`.
* Concatenate variant images with product images and remove duplicate images based on Shopify CDN file URL.
* Modify `useSelectedVariant` hook in `app/hooks/useSelectedVariant.tsx` to include `images` field for the selected variant.
Copy link

vercel bot commented Oct 31, 2024

@vishwamartur is attempting to deploy a commit to the Frontvibe Team on Vercel.

A member of the Team first needs to authorize it.

@thomasKn thomasKn force-pushed the main branch 3 times, most recently from a066e71 to 7d12c0f Compare November 12, 2024 21:32
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.

1 participant