import _ from 'lodash' import { ArrowCircleLeftIcon } from '@heroicons/react/solid' import { Col } from '../../../components/layout/col' import { Leaderboard } from '../../../components/leaderboard' import { Page } from '../../../components/page' import { SiteLink } from '../../../components/site-link' import { formatMoney } from '../../../lib/util/format' import { foldPath, getFoldBySlug } from '../../../lib/firebase/folds' import { Fold } from '../../../../common/fold' import { Spacer } from '../../../components/layout/spacer' export async function getStaticProps(props: { params: { foldSlug: string } }) { const { foldSlug } = props.params const fold = await getFoldBySlug(foldSlug) return { props: { fold }, revalidate: 60, // regenerate after a minute } } export async function getStaticPaths() { return { paths: [], fallback: 'blocking' } } export default function Leaderboards(props: { fold: Fold }) { const { fold } = props return ( {' '} {fold.name} formatMoney(user.totalPnLCached), }, ]} /> formatMoney(user.creatorVolumeCached), }, ]} /> ) }