All files / src/pages/Home/sections NotableUsersSection.js

100% Statements 15/15
100% Branches 0/0
100% Functions 7/7
100% Lines 14/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148                61x                                                                                       61x                               61x 30x 30x 15x                   30x 15x 120x                                           15x 120x                     30x 15x                     30x                                    
import React from 'react';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
import NavButton from '../../../components/NavButton';
import IconButton from '@material-ui/core/IconButton';
 
const notableUsers = [
  {
    alt: 'Hack for LA',
    link: 'https://www.hackforla.org/',
    src: '/images/hack-for-la.png',
  },
  {
    alt: 'Code for America',
    link: 'https://www.codeforamerica.org/',
    src: '/images/code-for-america.svg',
  },
  {
    alt: 'OpenOakland',
    link: 'https://openoakland.org/',
    src: '/images/open-oakland.svg',
  },
  {
    alt: 'Code for Tulsa',
    link: 'https://www.meetup.com/Code-for-Tucson/',
    src: '/images/code-for-tulsa.png',
  },
 
  {
    alt: 'Code for Chapel Hill',
    link: 'http://www.codeforchapelhill.com/',
    src: '/images/code-for-chapel-hill.png',
  },
  {
    alt: 'Code for PDX',
    link: 'https://www.meetup.com/Code-for-PDX/',
    src: '/images/code-for-PDX.png',
  },
  {
    alt: 'Code for Buffalo',
    link: 'https://www.codeforbuffalo.org/',
    src: '/images/code-for-buffalo.png',
  },
  {
    alt: 'BetaNYC',
    link: 'https://beta.nyc/',
    src: '/images/betanyc.png',
  },
];
 
const useStyles = makeStyles((theme) => ({
  sectionTitle: {
    '& h1': {
      fontSize: '28px',
    },
 
    padding: '48px 0 32px 0',
    [theme.breakpoints.down('md')]: {
      '& h1': {
        fontSize: '24px',
      },
      padding: '16px 0 32px 0',
    },
  },
}));
 
const NotableUsersSection = () => {
  const classes = useStyles();
  const SectionTitle = () => {
    return (
      <Grid item lg={12} md={12} sm={12} className={classes.sectionTitle}>
        <Typography variant='h1' align='center'>
          {' '}
                    See how the Civic Tech Index is used by:
        </Typography>
      </Grid>
    );
  };
 
  const LogoList = () => {
    const LogoItem = (props) => {
      return (
        <Grid item lg={3} md={3} xs={6} style={{ height: '120px' }}>
          <Grid
            container
            alignItems='center'
            justify='center'
            style={{ height: '100%' }}>
            <IconButton
              href={props.link
              }>
              <img
                style={{ top: '50%' }}
                align='center'
                alt={props.alt}
                src={props.src}
              />
            </IconButton>
          </Grid>
        </Grid>
      );
    };
 
    return notableUsers.map((image, key) => {
      return (
        <LogoItem
          key={key}
          link={image.link}
          alt={image.alt}
          src={image.src}
        />
      );
    });
  };
 
  const MoreContributors = () => {
    return (
      <Grid item xs={12} style={{ padding: '30px' }}>
        <div align='center'>
          <NavButton href='/contributors/affiliated' color='primary'>
                        View contributors
          </NavButton>
        </div>
      </Grid>
    );
  };
 
  return (
    <Grid
      container
      alignItems='center'
      justify='center'
      style={{ padding: '64.24px 0 0 0' }}>
      <Paper>
        <Grid container justify='center'>
          <SectionTitle />
          <LogoList />
          <MoreContributors />
        </Grid>
      </Paper>
    </Grid>
  );
};
 
export default NotableUsersSection;