Displaying /stores and /products for a store #12
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theFooter
andHeader
components, the addition of aSlides
component, and various adjustments to content collection and interfaces.Component Updates:
Card Component:
Fragment
import and updated theCard
component to use it for rendering tags. [1] [2]Footer Component:
Socials
component and adding new navigation links. [1] [2]Header Component:
store
prop structure to include nesteddata
. [1] [2]New Component:
Slides
component to display a collection of images with captions.Content Collection and Interface Adjustments:
Content Collection:
products
collection and updated existing collections to include necessary filters and populate options.Interfaces:
Product
andStore
interfaces to include SEO-related fields. [1] [2]Miscellaneous:
LinkButton Component:
target
prop to theLinkButton
component. [1] [2] [3]Tag Component:
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 theHeader
component, and enhancements to theTag
component. Additionally, there are updates to the data fetching logic for stores and products across multiple files.Component and UI Updates:
src/components/Card.tsx
: Adjusted the class names for better responsiveness and refactored the tags rendering logic to useFragment
for key assignment. [1] [2]src/components/Tag.astro
: Made thetag
prop optional and adjusted the SVG path formatting for better readability. [1] [2]Data Fetching and Handling:
src/components/Header.astro
: Modified thestore
prop structure to include a nesteddata
object, and updated the usage accordingly. [1] [2]src/content/config.ts
: Added a newproducts
collection and updated existing collections to include necessary filters and populate fields.src/interfaces/Product.ts
andsrc/interfaces/Store.ts
: Enhanced theSEO
field to includemetaTitle
andmetaDescription
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 correspondingCard
components.These changes collectively improve the data management and presentation of stores and products, enhancing the overall user experience.