import { GetServerSideProps } from "next"; import Head from "next/head"; import fetchAPI from "../../../lib/fetch"; import { Name, Pronoun, User, WordStatus } from "../../../lib/types"; import FieldCard from "../../../components/FieldCard"; import Card from "../../../components/Card"; import ReactMarkdown from "react-markdown"; import Image from "next/image"; import { userState } from "../../../lib/state"; import { useRecoilValue } from "recoil"; import Link from "next/link"; import FallbackImage from "../../../components/FallbackImage"; import { ReactNode } from "react"; import { EmojiLaughing, HandThumbsDown, HandThumbsUp, HeartFill, People, } from "react-bootstrap-icons"; import BlueLink from "../../../components/BlueLink"; interface Props { user: User; } export default function Index({ user }: Props) { const isMeUser = useRecoilValue(userState)?.id === user.id; return ( <>
{entryIcon(name.status)} {name.name}
); } function PronounEntry(props: { pronoun: Pronoun }) { const { pronoun } = props; return ({entryIcon(pronoun.status)}{" "} {pronoun.display_text ?? pronoun.pronouns.split("/").slice(0, 2).join("/")}
); } export const getServerSideProps: GetServerSideProps = async (context) => { try { const user = await fetchAPI