Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
remove edit label from post bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ceolinwill committed Jun 29, 2020
1 parent becd8f0 commit 90677e6
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/components/PostBarActions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dynamic from 'next/dynamic';
import NextLink from 'next/link';
import { Button, Hidden, makeStyles } from '@material-ui/core';
import { Button, makeStyles } from '@material-ui/core';
import { Edit } from '@material-ui/icons';
import useTranslation from './useTranslation';

Expand All @@ -19,12 +19,6 @@ const useStyles = makeStyles((theme) => ({
marginRight: theme.spacing(1),
},
},
button: {
marginRight: theme.spacing(0),
[theme.breakpoints.up('sm')]: {
marginRight: theme.spacing(0.5),
},
},
}));

const PostBarActions = ({ canEdit, id, likes }: PostBarActionsProps) => {
Expand All @@ -36,9 +30,14 @@ const PostBarActions = ({ canEdit, id, likes }: PostBarActionsProps) => {
<LikeButton likes={likes} itemPath={`posts/${id}`} />
{canEdit && (
<NextLink href="/posts/[id]/edit" as={`/posts/${id}/edit`} passHref>
<Button color="primary" variant="outlined" component="a">
<Edit className={classes.button} />
<Hidden xsDown>{translate('edit')}</Hidden>
<Button
color="primary"
variant="outlined"
component="a"
aria-label={translate('edit')}
title={translate('edit')}
>
<Edit />
</Button>
</NextLink>
)}
Expand Down

0 comments on commit 90677e6

Please sign in to comment.