2024-03-20 00:37:31 +00:00
|
|
|
import Layout from '@/components/layout'
|
2023-07-23 15:08:43 +00:00
|
|
|
import { useRouter } from 'next/router'
|
2024-03-20 00:37:31 +00:00
|
|
|
import { getGetServerSideProps } from '@/api/ssrApollo'
|
|
|
|
import TopHeader from '@/components/top-header'
|
|
|
|
import { TOP_USERS } from '@/fragments/users'
|
|
|
|
import UserList from '@/components/user-list'
|
2023-07-23 15:08:43 +00:00
|
|
|
|
2023-08-28 17:52:15 +00:00
|
|
|
export const getServerSideProps = getGetServerSideProps({ query: TOP_USERS })
|
2023-07-23 15:08:43 +00:00
|
|
|
|
|
|
|
export default function Index ({ ssrData }) {
|
|
|
|
const router = useRouter()
|
|
|
|
const variables = { ...router.query }
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Layout>
|
|
|
|
<TopHeader cat='stackers' />
|
|
|
|
<UserList
|
|
|
|
ssrData={ssrData} query={TOP_USERS}
|
|
|
|
variables={variables} destructureData={data => data.topUsers}
|
2024-02-14 21:06:42 +00:00
|
|
|
rank
|
2023-07-23 15:08:43 +00:00
|
|
|
/>
|
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|