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

components in React #4

Merged
merged 4 commits into from
May 12, 2024
Merged

components in React #4

merged 4 commits into from
May 12, 2024

Conversation

NosatskyiK
Copy link
Owner

@NosatskyiK NosatskyiK commented May 10, 2024

Acceptance Criteria for 1

  • Mentor is added to pr
  • AC copied to pr description
  • Link to deployed version is added to pr
  • The ProductsList component correctly receives product data as props.
  • ProductCard component created and renders a single product.
  • Header and Footer elements are present.
  • ProductList displays right on mobile devices

Acceptance Criteria for 1*

  • The Header component has clickable elements that toggle the display between the About and ProductsList components.
  • State management is handled in App.tsx, with state determining which component to show.
  • LocalStorage added to save items in card after page realod

https://nosatskyik.github.io/fe-react-2024/

src/components/cart/Cart.component.tsx Outdated Show resolved Hide resolved
src/components/cart/Cart.component.tsx Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/components/cart/Cart.component.tsx Outdated Show resolved Hide resolved
src/components/productList/ProductList.component.tsx Outdated Show resolved Hide resolved
src/components/productList/ProductList.component.tsx Outdated Show resolved Hide resolved
src/components/productList/productList.module.css Outdated Show resolved Hide resolved
@NosatskyiK
Copy link
Owner Author

  • Removed the unnecessary toggleCart function and replaced it with an arrow function in onClick.
  • Removed unnecessary React imports
  • Changed the name for useState in the cart
  • Changed the productList logic
  • Changed the main tag to a section and gave it the productList class

@vadym-zinchenko-moc vadym-zinchenko-moc merged commit 48e0aff into main May 12, 2024
4 checks passed
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.

2 participants