refactor(starter): upgrade to new version of gatsby

This commit is contained in:
Alexander Shelepenok
2022-01-09 20:12:31 +00:00
parent 84bdc5899d
commit 67ebabbaac
397 changed files with 26665 additions and 34984 deletions

View File

@@ -0,0 +1,45 @@
import React from "react";
import { Link, withPrefix } from "gatsby";
import styles from "./Author.module.scss";
type Props = {
author: {
name: string;
bio: string;
photo: string;
};
isIndex?: boolean;
};
const Author = ({ author, isIndex }: Props) => (
<div className={styles.author}>
<Link to="/">
<img
src={withPrefix(author.photo)}
className={styles.author__photo}
width="75"
height="75"
alt={author.name}
/>
</Link>
{isIndex === true ? (
<h1 className={styles.author__title}>
<Link className={styles["author__title-link"]} to="/">
{author.name}
</Link>
</h1>
) : (
<h2 className={styles.author__title}>
<Link className={styles["author__title-link"]} to="/">
{author.name}
</Link>
</h2>
)}
<p className={styles.author__subtitle}>{author.bio}</p>
</div>
);
export default Author;