frontend/сomponents/ProductsView/index.tsx

26 lines
793 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";
import { products } from "../../store/reducers/nodesInputReducer";
export const ProductsView:React.FC = () =>{
const getProducts = useAppSelector(products)
console.log(getProducts)
return(
<div>
2022-10-22 19:35:53 +03:00
{
getProducts.map(el=> <Card title={el.name} bordered={true}>
<div>
{el.category}
</div>
<div>
{
el.characteristics == undefined? "":el.characteristics.toString()
}
</div>
</Card>)
}
2022-10-22 19:11:56 +03:00
</div>
);
}