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.subtitle}