-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
✅ Deploy Preview for home-goods-store ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
f38af6b
to
1427634
Compare
export interface CartViewProps { | ||
cart?: Cart; | ||
cartTotals?: CartTotals; | ||
close: () => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onClose
?
fullPrice: string; | ||
} | ||
|
||
export const Price = ({ fullPrice, discountedPrice }: PriceProps) => { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove, thnx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The work follows e-commerce-remix template refactorings (PR, PR).
CartView
componentCart
component to handle all the logic and renderCartView
CartItem
useCart
hook copiedPrice
is copied from remix template, no changesuseCart
api-hook renamed touseCartData
No updating states (no loaders) for Cart items and Cart summary in this PR.