import { gql } from '@apollo/client'
import { getGetServerSideProps } from '../api/ssrApollo'
import Layout from '../components/layout'
import { LineChart, Line, XAxis, YAxis, Tooltip, Legend, ResponsiveContainer } from 'recharts'
import { Col, Row } from 'react-bootstrap'
import { formatSats } from '../lib/format'
export const getServerSideProps = getGetServerSideProps(
gql`
{
registrationGrowth {
time
num
}
activeGrowth {
time
num
}
itemGrowth {
time
num
}
spentGrowth {
time
num
}
earnedGrowth {
time
num
}
}`)
const dateFormatter = timeStr => {
const date = new Date(timeStr)
return `${('0' + (date.getMonth() + 2)).slice(-2)}/${String(date.getFullYear()).slice(-2)}`
}
export default function Growth ({
data: { registrationGrowth, activeGrowth, itemGrowth, spentGrowth, earnedGrowth }
}) {
return (
)
}
function GrowthLineChart ({ data, xName, yName }) {
return (
)
}