Skip to content

Commit

Permalink
Correct avatar link in postInfo and rename avatar prop (#2017)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanLeeMidori authored Mar 24, 2021
1 parent f42314a commit a96b605
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/web/src/components/Posts/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const PostComponent = ({ postUrl }: Props) => {
{!desktop && (
<>
<div className={classes.authorAvatarContainer}>
<PostAvatar name={post.feed.author} postURL={post.feed.link} />
<PostAvatar name={post.feed.author} blog={post.feed.link} />
</div>
<div className={classes.authorNameContainer}>
<h1 className={classes.author}>
Expand Down
6 changes: 3 additions & 3 deletions src/web/src/components/Posts/PostAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { makeStyles } from '@material-ui/core/styles';
type AvatarProps = {
name: string;
img?: string;
postURL: string;
blog: string;
};

const useStyles = makeStyles((theme: Theme) =>
Expand Down Expand Up @@ -39,7 +39,7 @@ const useStyles = makeStyles((theme: Theme) =>
})
);

const PostAvatar = ({ name, img, postURL }: AvatarProps) => {
const PostAvatar = ({ name, img, blog }: AvatarProps) => {
const classes = useStyles();

if (img) {
Expand All @@ -58,7 +58,7 @@ const PostAvatar = ({ name, img, postURL }: AvatarProps) => {
)
.join('');
return (
<a href={postURL} className={classes.link}>
<a href={blog} className={classes.link}>
<Avatar className={classes.avatar}>
<p className={classes.text}>{initials}</p>
</Avatar>
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/components/Posts/PostInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const PostDesktopInfo = ({ authorName, postDate, blogUrl, postUrl }: Props) => {
return (
<ListSubheader className={classes.root}>
<div className={classes.authorAvatarContainer}>
<PostAvatar name={authorName} postURL={postUrl} />
<PostAvatar name={authorName} blog={blogUrl} />
</div>
<div className={classes.authorNameContainer}>
<h1 className={classes.author}>
Expand Down

0 comments on commit a96b605

Please sign in to comment.