import React, { useEffect, useState } from 'react' import { getPagesUnderRoute } from 'nextra/context' import { type Page } from 'nextra' import { SocialIcon } from 'react-social-icons' import Image from 'next/image' import Link from 'next/link' interface AuthorMetadata { authorid: string subtitle: string name: string bio: string ogImage: string socials?: { [key: string]: string } } const AuthorCard: React.FC<{ author: AuthorMetadata }> = ({ author }) => { const [isClient, setIsClient] = useState(false) useEffect(() => { setIsClient(true) }, []) const socialsEntries = Object.entries(author.socials ?? {}).filter( ([, value]) => !!value, ) as unknown as [string, string][] return (
{author.name}

{author.name}

{author.subtitle}

{isClient && socialsEntries.map(([key, value]) => ( e.stopPropagation()} > ))}
) } const AuthorPage: React.FC = () => { const allAuthors = getPagesUnderRoute('/authors') as Array const authors = allAuthors.filter((author) => !!author.frontMatter.authorid) return (

Our Authors

{authors.map((author) => ( ))}
) } export default AuthorPage