frontend/сomponents/ProductsView/index.tsx

19 lines
583 B
TypeScript
Raw Normal View History

2022-10-22 19:11:56 +03:00
import { Card } from "antd";
import React from "react";
import { useAppSelector } from "../../hooks";
2022-10-22 21:01:16 +03:00
import { fetcher } from "../../pages/api/fetch";
2022-10-22 19:11:56 +03:00
import { products } from "../../store/reducers/nodesInputReducer";
2022-10-22 22:40:21 +03:00
import { ProductCard } from "../card";
import styles from "../card/card.module.css"
2022-10-22 19:11:56 +03:00
export const ProductsView:React.FC = () =>{
const getProducts = useAppSelector(products)
return(
2022-10-22 22:40:21 +03:00
<div className={styles.productWrapper}>
2022-10-22 19:35:53 +03:00
{
2022-10-22 22:40:21 +03:00
getProducts.map(el=> <ProductCard {...el}></ProductCard>)
2022-10-22 19:35:53 +03:00
}
2022-10-22 19:11:56 +03:00
</div>
);
}