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

Displaying /stores and /products for a store #12

Merged
merged 12 commits into from
Dec 9, 2024
Merged

Conversation

dvidsilva
Copy link
Contributor

@dvidsilva dvidsilva commented Dec 9, 2024

This pull request includes several changes across multiple files to improve the functionality and structure of the project. The most important changes include updates to the Card component, enhancements to the Footer and Header components, the addition of a Slides component, and various adjustments to content collection and interfaces.

Component Updates:

  • Card Component:

    • Added Fragment import and updated the Card component to use it for rendering tags. [1] [2]
    • Modified the list item class to be responsive.
  • Footer Component:

    • Reorganized the footer layout by moving the Socials component and adding new navigation links. [1] [2]
    • Updated styles to highlight active links.
  • Header Component:

    • Adjusted the store prop structure to include nested data. [1] [2]

New Component:

  • Slides Component:
    • Introduced a new Slides component to display a collection of images with captions.

Content Collection and Interface Adjustments:

  • Content Collection:

    • Added a new products collection and updated existing collections to include necessary filters and populate options.
  • Interfaces:

    • Updated the Product and Store interfaces to include SEO-related fields. [1] [2]

Miscellaneous:

  • LinkButton Component:

    • Added a target prop to the LinkButton component. [1] [2] [3]
  • Tag Component:

    • Made the tag prop optional and provided a default value. [1] [2]

These changes enhance the overall functionality and maintainability of the project by improving component flexibility, ensuring better data handling, and adding new features.This pull request includes several changes to improve the handling of store and product data, as well as some UI adjustments. The most important changes include updates to the Card component, modifications to the Header component, and enhancements to the Tag component. Additionally, there are updates to the data fetching logic for stores and products across multiple files.

Component and UI Updates:

Data Fetching and Handling:

  • src/components/Header.astro: Modified the store prop structure to include a nested data object, and updated the usage accordingly. [1] [2]
  • src/content/config.ts: Added a new products collection and updated existing collections to include necessary filters and populate fields.
  • src/interfaces/Product.ts and src/interfaces/Store.ts: Enhanced the SEO field to include metaTitle and metaDescription properties. [1] [2]

Page and Layout Enhancements:

  • src/layouts/Posts.astro: Updated the store data fetching logic and improved the handling of post titles and descriptions with fallback to SEO meta fields. [1] [2]
  • src/pages/index.astro: Added logic to fetch and display products, including a new section for recent products with corresponding Card components.

These changes collectively improve the data management and presentation of stores and products, enhancing the overall user experience.

@dvidsilva dvidsilva merged commit d3609c5 into main Dec 9, 2024
1 check passed
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