import { useSelector } from 'react-redux'; // material-ui import { ImageListItem, ImageListItemBar } from '@mui/material'; import MImageList from '@mui/material/ImageList'; // project imports import { DefaultRootStateProps } from 'types'; import { PostImage } from '_mockApis/user-profile/types'; // set image width & height radio function srcset(image: string, width: number, height: number, rows = 1, cols = 1) { return `${image}?w=${width * cols}&h=${height * rows}&fit=crop&auto=format 1x, ${image}?w=${width * cols}&h=${height * rows}&fit=crop&auto=format&dpr=2 2x`; } // ==============================|| IMAGE LIST/GRID ||============================== // export interface ImageListProps { itemData: PostImage[]; } const ImageList = ({ itemData }: ImageListProps) => { const customization = useSelector((state: DefaultRootStateProps) => state.customization); return ( {itemData.map((item) => { const cols = item.featured ? 2 : 1; const rows = item.featured ? 2 : 1; return ( {item.title} ); })} ); }; export default ImageList;