diff --git a/src/components/Author.tsx b/src/components/Author.tsx new file mode 100644 index 0000000..f575ea9 --- /dev/null +++ b/src/components/Author.tsx @@ -0,0 +1,33 @@ +import React from 'react' +import Image from 'next/image' +import type { Author } from 'types/payload-types' + +interface Props { + author: Author +} + +const AuthorComponent: React.FC = ({ author }) => { + return ( + <> + {author && ( +
+ {typeof author.avatar === 'object' && ( + {author.avatar.alt + )} +
+

{author.name}

+

{author.bio}

+
+
+ )} + + ) +} + +export default AuthorComponent