frontend/сomponents/ProductsView/index.tsx
2022-10-22 19:35:53 +03:00

26 lines
793 B
TypeScript

import { Card } from "antd";
import React from "react";
import { useAppSelector } from "../../hooks";
import { products } from "../../store/reducers/nodesInputReducer";
export const ProductsView:React.FC = () =>{
const getProducts = useAppSelector(products)
console.log(getProducts)
return(
<div>
{
getProducts.map(el=> <Card title={el.name} bordered={true}>
<div>
{el.category}
</div>
<div>
{
el.characteristics == undefined? "":el.characteristics.toString()
}
</div>
</Card>)
}
</div>
);
}