import React from "react";
import { makeStyles } from "@material-ui/core/styles";

import GridContainer from "components/Grid/GridContainer.js";
import Grid from '@material-ui/core/Grid';
import Card from "components/Card/Card.js";
import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js";

const useStyles = makeStyles(styles);
const DataBusinessPartner = function ({ backend, businessPartners, ...props })  {
    const classes = useStyles();
    const BusinessPartners = businessPartners.map((data) => {
      return (
      <Grid align="center" style={{padding:"40px", marginTop:"-50px"}}>
        <Card style={{width: "20rem"}}>
        <div align="center">
          <img
            style={{padding:"20px", height: "180px", width: "300px", display: "block"}} className={classes.imgCardTop} src={`${backend}${data.img[0]["url"]}`}/>
        </div>
        </Card>
      </Grid>
      );
    })
    return (
      <div className={classes.section} id="notifications" style={{marginTop:"-50px"}}>
        <div align="center">
            <h2>Our Business Partner</h2>
        </div>
        <div>
          <GridContainer justify="center">
            {BusinessPartners}
          </GridContainer>
        </div>
      </div>
    );
}

export default DataBusinessPartner;