import { Avatar, Spinner } from '@material-tailwind/react' import { Entity, MegalodonInterface } from 'megalodon' import emojify from '@/utils/emojify' import { Virtuoso } from 'react-virtuoso' import { useRouter } from 'next/router' type Props = { client: MegalodonInterface users: Array loading: boolean } export default function Accounts(props: Props) { const router = useRouter() const openUser = (id: string) => { router.push({ query: { id: router.query.id, timeline: router.query.timeline, user_id: id, detail: true } }) } return ( <>
{props.users.length > 0 ? ( } /> ) : ( <> {props.loading && (
)} )}
) } type UserProps = { user: Entity.Account openUser: (id: string) => void } function User(props: UserProps) { return (
props.openUser(props.user.id)}>

@{props.user.acct}

) }