import React from 'react' import Head from 'next/head' import {GetStaticProps} from 'next' import {SimpleLayout} from '@/components/SimpleLayout' import {Card} from '@/components/Card' import {CardGroup} from '@/components/CardGroup' import {numberFormat} from '@/lib/numberFormat' import {getDashboardData} from '@/lib/dashboard' import type {MetricGroup} from '@/types' export default function Dashboard({metrics}: { metrics: MetricGroup }) { return ( <> Dashboard - Ryan Freeman {metrics.map(({groupName, groupItems}) => ( {groupItems.map((item) => (

{item.title}

{typeof item.value === "number" ? numberFormat(item.value) : item.value}
))}
))}
) } export const getStaticProps: GetStaticProps = async () => { return { props: { metrics: await getDashboardData() } } }