import { Link } from 'react-router-dom'; import defaultGoodImage from '../../../images/default-good-image.png'; import { Grid, Box, Stack, Typography } from '@mui/material'; import { backendURL } from '../../../helpers'; const SearchGoodResultItem = ({ good, onClick, link = '' } = {}) => { const { _id = 0, images = [], name = '', description = '', price = '' } = good || {}; return ( onClick && onClick()} spacing={1} > {name.length > 30 ? `${name.substring(0, 30)}...` : name} {description.length > 70 ? `${description.substring(0, 70)}...` : description} {price} ); }; export default SearchGoodResultItem;