import Card from "@material-ui/core/Card"; import { createStyles, Theme, withStyles, WithStyles } from "@material-ui/core/styles"; import Table from "@material-ui/core/Table"; import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"; import React from "react"; import { FormattedMessage } from "react-intl"; import Skeleton from "@saleor/components/Skeleton"; const styles = (theme: Theme) => createStyles({ arrowIcon: { width: theme.spacing.unit * 4 }, tableRow: { cursor: "pointer" } }); interface HomeNotificationTableProps extends WithStyles { ordersToCapture: number; ordersToFulfill: number; productsOutOfStock: number; onOrdersToFulfillClick: () => void; onOrdersToCaptureClick: () => void; onProductsOutOfStockClick: () => void; } const HomeNotificationTable = withStyles(styles, { name: "HomeNotificationTable" })( ({ classes, onOrdersToCaptureClick, onOrdersToFulfillClick, onProductsOutOfStockClick, ordersToCapture, ordersToFulfill, productsOutOfStock }: HomeNotificationTableProps) => ( {ordersToFulfill === undefined ? ( ) : ordersToFulfill === 0 ? ( ) : ( {ordersToFulfill} }} /> )} {ordersToCapture === undefined ? ( ) : ordersToCapture === 0 ? ( ) : ( {ordersToCapture} }} /> )} {productsOutOfStock === undefined ? ( ) : productsOutOfStock === 0 ? ( ) : ( {productsOutOfStock} }} /> )}
) ); HomeNotificationTable.displayName = "HomeNotificationTable"; export default HomeNotificationTable;