From 048b655dac18ae6518621c5f74fc306f9a03c1ab Mon Sep 17 00:00:00 2001 From: Yevhenii Polishchuk Date: Fri, 13 Oct 2023 12:56:48 +0300 Subject: [PATCH 1/2] practice solution --- README.md | 4 +- src/App.jsx | 500 ++++++++++++++++++++++++++++------------------------ 2 files changed, 267 insertions(+), 237 deletions(-) diff --git a/README.md b/README.md index 3c428102e..d157727f1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > Here is [the working version](https://mate-academy.github.io/react_product-categories-practice/) -You are given a markup for a table of products and 3 arrays. +You are given a markup for a table of products and 3 arrays. Implement as many options below as you can: 1. Render products in a table with id, name, category, and owner (user). @@ -33,7 +33,7 @@ Implement as many options below as you can: ## Instructions - Fork, clone, and run `npm i` - fix the DEMO LINK below (use your GitHub username and the repo name) - - [DEMO LINK](https://.github.io/) + - [DEMO LINK](https://YePolishchuk.github.io/) - implement tasks one by one (You can do it in the `App.jsx`) - `commit`, `push`, and `deploy` after each task - Send a link to your `App.jsx` file to your personal Slack channel (for example #fe_apr22_misha_hrynko) diff --git a/src/App.jsx b/src/App.jsx index ff3285812..f567626c3 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,248 +1,278 @@ /* eslint-disable jsx-a11y/accessible-emoji */ -import React from 'react'; +import React, { useState } from 'react'; +import cn from 'classnames'; import './App.scss'; -// import usersFromServer from './api/users'; -// import categoriesFromServer from './api/categories'; -// import productsFromServer from './api/products'; - -// const products = productsFromServer.map((product) => { -// const category = null; // find by product.categoryId -// const user = null; // find by category.ownerId - -// return null; -// }); - -export const App = () => ( -
-
-

Product Categories

- -
-