import { gql } from '@apollo/client'
import { getGetServerSideProps } from '../../api/ssrApollo'
import Layout from '../../components/layout'
import { Tooltip, ResponsiveContainer, PieChart, Pie, Cell } from 'recharts'
import { Col, Row } from 'react-bootstrap'
import { UsageHeader } from '../../components/usage-header'
export const getServerSideProps = getGetServerSideProps(
gql`
{
registrationsWeekly
activeWeekly
earnersWeekly
itemsWeekly {
name
value
}
spentWeekly {
name
value
}
stackedWeekly {
name
value
}
}`)
export default function Growth ({
data: {
registrationsWeekly, activeWeekly, itemsWeekly, spentWeekly,
stackedWeekly, earnersWeekly
}
}) {
return (
registrations
{registrationsWeekly}
spenders
{activeWeekly}
stackers
{earnersWeekly}
items
stacked
spent
)
}
const COLORS = [
'var(--secondary)',
'var(--info)',
'var(--success)',
'var(--boost)',
'var(--grey)'
]
function GrowthPieChart ({ data }) {
return (
{
data.map((entry, index) => (
|
))
}
)
}