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

refactor: split Cart component into functional (Cart) and view parts (CartView) #140

Merged
merged 4 commits into from
Oct 14, 2024

Conversation

tetianaman
Copy link
Collaborator

@tetianaman tetianaman commented Oct 11, 2024

The work follows e-commerce-remix template refactorings (PR, PR).

  • created CartView component
  • updated Cart component to handle all the logic and render CartView
  • updated CartItem
  • useCart hook copied
  • component Price is copied from remix template, no changes
  • mock-ecom-api-context-provider and fakers files removed
  • useCart api-hook renamed to useCartData

No updating states (no loaders) for Cart items and Cart summary in this PR.

Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for home-goods-store ready!

Name Link
🔨 Latest commit f38af6b
🔍 Latest deploy log https://app.netlify.com/sites/home-goods-store/deploys/67093b8cff92de00086e1468
😎 Deploy Preview https://deploy-preview-140--home-goods-store.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tetianaman tetianaman changed the base branch from main to development October 11, 2024 14:52
@tetianaman tetianaman force-pushed the tetianaman/refactor-cart-components branch from f38af6b to 1427634 Compare October 11, 2024 15:01
@tetianaman tetianaman requested a review from yurii-ve October 11, 2024 15:02
@tetianaman tetianaman requested a review from Letushev October 11, 2024 15:32
@tetianaman tetianaman changed the title refactor: split Cart component into functional (Cart) and view parts (CartView and CartItem) refactor: split Cart component into functional (Cart) and view parts (CartView) Oct 11, 2024
export interface CartViewProps {
cart?: Cart;
cartTotals?: CartTotals;
close: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

onClose?

@tetianaman tetianaman merged commit c95629f into development Oct 14, 2024
1 check passed
fullPrice: string;
}

export const Price = ({ fullPrice, discountedPrice }: PriceProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already had this component. ProductPrice

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will remove, thnx

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alisey alisey deleted the tetianaman/refactor-cart-components branch November 8, 2024 22:37
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.

3 participants