mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-10 18:26:15 +02:00
41 lines
847 B
TypeScript
41 lines
847 B
TypeScript
import React from "react";
|
|
|
|
import { Link } from "gatsby";
|
|
|
|
import * as styles from "./Author.module.scss";
|
|
import { Image } from "@/components/Image";
|
|
|
|
type Props = {
|
|
author: {
|
|
name: string;
|
|
bio: string;
|
|
photo: string;
|
|
};
|
|
isIndex?: boolean;
|
|
};
|
|
|
|
const Author = ({ author, isIndex }: Props) => (
|
|
<div className={styles.author}>
|
|
<Link to="/">
|
|
<Image alt={author.name} path={author.photo} className={styles.photo} />
|
|
</Link>
|
|
|
|
{isIndex ? (
|
|
<h1 className={styles.title}>
|
|
<Link className={styles.link} to="/">
|
|
{author.name}
|
|
</Link>
|
|
</h1>
|
|
) : (
|
|
<h2 className={styles.title}>
|
|
<Link className={styles.link} to="/">
|
|
{author.name}
|
|
</Link>
|
|
</h2>
|
|
)}
|
|
<p className={styles.subtitle}>{author.bio}</p>
|
|
</div>
|
|
);
|
|
|
|
export default Author;
|