-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cart page #19
Cart page #19
Conversation
client/src/components/Button.tsx
Outdated
@@ -0,0 +1,3 @@ | |||
export default function Button({ action, children }) { |
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.
Great job with the Cart modal - everything is neat so far and works as expected! However, one small comment I have is regarding the component props here and in the Modal
component. Since we are using TypeScript, maybe it would be good to also show the types of passed props because without it they implicitly have a type of 'any'. Details on this page.
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.
Great job! I left a few comments of items to address, once those are addressed this can be merged in!
client/src/components/Modal.tsx
Outdated
@@ -0,0 +1,20 @@ | |||
import { useEffect, useRef } from "react"; | |||
|
|||
export default function Modal({ onClose, isOpen, children }) { |
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.
Reminder to define the types of the props that you're importing
client/src/components/Modal.tsx
Outdated
<dialog ref={modalRef} className={className}> | ||
<button | ||
onClick={onClose} | ||
style={{ |
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.
I tend to keep my inline styles to less than 3 - what do you think of using that as our standard for the project, and moving these styles into a css file?
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.
moving these still out of here and passing the classes in as a prop instead.
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.
Awesome, thanks!
@larkinds I think I've addressed all your requested changes. If there's nothing else, could you please approve this so I can merge this PR? |
client/src/pages/cart/CartBtn.tsx
Outdated
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.
Oh my gosh, this icon is so cute!
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.
Looks great, really well done @thelmaboamah!
cart component with quantity counter and remove button for each item in the cart.
Covered issues: #2 #1 #3 #4 #6 #7 #24