Release 1.0.0#70
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 introduces several enhancements and refactors to the e-commerce platform, focusing on improving performance, simplifying code, and adding new features. Key changes include migrating to server-side rendering for several pages, refactoring the
HomeandProductDetailPagecomponents to use asynchronous data fetching, and updating theOrderInProgresspage to improve socket handling and order status management.Frontend Refactoring and Performance Improvements
Homepage to use server-side rendering with async components likeProductsRecommended,ProductsOffer, andCategories. Removed client-side state management and API calls, replacing them withSuspensefor fallback loading states. (src/app/(shop)/page.tsx, [1] [2]ProductDetailPageto fetch data asynchronously on the server, simplifying the component by removing client-side hooks and state management. Added a newPresentationDropdowncomponent for selecting product variants. (src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsx, src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsxL1-R56, src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsxL129-L133, src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsxR91-R96, src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsxL171-R110, src/app/(shop)/product/[productId]/presentation/[presentationId]/page.tsxL187-R123)Order Management Enhancements
OrderInProgressto improve socket connection handling and manage order status updates more effectively. Replaced redundant state variables and added new cases forOrderStatusto handle different payment methods and order flows. (src/app/(shop)/order/[id]/page.tsx, src/app/(shop)/order/[id]/page.tsxL31-R32, src/app/(shop)/order/[id]/page.tsxR41-L64, src/app/(shop)/order/[id]/page.tsxL78-R69, src/app/(shop)/order/[id]/page.tsxR142-L163)Dependency Updates
@pharmatech/sdkto version0.4.21and added@microsoft/fetch-event-sourceas a new dependency. Reorganizedpackage.jsondependencies for consistency. (package.json, package.jsonR21-R27)New Features
ProductNotFounderror page to handle cases where a product is not found, improving user experience with a clear message and a "Go Back" button. (src/app/(shop)/product/error.tsx, src/app/(shop)/product/error.tsxR1-R45)Minor Updates
Homepage test to support async rendering of theHomecomponent. (__tests__/page.test.tsx, tests/page.test.tsxL7-R8)1.0.0inpackage.json. (package.json, package.jsonL3-R3)