Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Commit a0f5b6c

Browse files
committed
fix(Tests): Fixed broken link tests
1 parent 33a044f commit a0f5b6c

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

components/list/ListItem.tsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
import Image from '../Image';
22
import {
33
ListItem as MUIListItem,
4-
Divider,
54
ListItemAvatar,
65
Avatar,
76
ListItemText,
87
Grid,
9-
Hidden,
10-
ListItemSecondaryAction,
118
Typography,
129
makeStyles,
1310
createStyles,
1411
Theme,
1512
} from '@material-ui/core';
1613
import Link from '../link/Link';
17-
import { Maybe } from 'graphql/jsutils/Maybe';
1814
import { Image as ImageType } from '../../pages/index';
1915

2016
const useStyles = makeStyles((theme: Theme) =>
@@ -45,7 +41,7 @@ export default function ListItem({ name, image, link }: Props) {
4541
const classes = useStyles();
4642
return (
4743
<MUIListItem divider>
48-
<Grid container>
44+
<Grid container alignItems="center">
4945
<ListItemAvatar>
5046
<Avatar alt={name} className={classes.avatar}>
5147
{/* NextJS Image optimization example. Props are src(any file under the public dir), width, and height */}
@@ -55,16 +51,9 @@ export default function ListItem({ name, image, link }: Props) {
5551
<ListItemText>
5652
<Typography variant="body1">{name}</Typography>
5753
</ListItemText>
58-
<Hidden smDown>
59-
<ListItemSecondaryAction className={classes.info}>
60-
<Link href={link.href} as={link?.as} label={link.label} />
61-
</ListItemSecondaryAction>
62-
</Hidden>
63-
<Hidden mdUp>
64-
<Grid container item xs={12} className={classes.info} justify="flex-end">
65-
<Link href={link.href} as={link?.as} label={link.label} />
66-
</Grid>
67-
</Hidden>
54+
<Grid container item xs={12} md={3} className={classes.info} justify="flex-end" alignItems="center">
55+
<Link href={link.href} as={link?.as} label={link.label} />
56+
</Grid>
6857
</Grid>
6958
</MUIListItem>
7059
);

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GetServerSideProps } from 'next';
2-
import { makeStyles, createStyles, Typography, Theme, Paper, List, Grid } from '@material-ui/core';
2+
import { makeStyles, createStyles, Typography, Theme, List, Grid } from '@material-ui/core';
33
import Layout from '../components/layout';
44
import ListItem, { Link } from '../components/list/ListItem';
55

0 commit comments

Comments
 (0)