mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
26 lines
603 B
TypeScript
26 lines
603 B
TypeScript
import { PageContainer } from 'components/Container';
|
|
import { PlayerList } from 'components/PlayerList';
|
|
import { getPlayers } from 'graphql/getPlayers';
|
|
import { InferGetStaticPropsType } from 'next';
|
|
import React from 'react';
|
|
|
|
type Props = InferGetStaticPropsType<typeof getStaticProps>;
|
|
|
|
export const getStaticProps = async () => {
|
|
const players = await getPlayers();
|
|
return {
|
|
props: {
|
|
players,
|
|
},
|
|
revalidate: 1,
|
|
};
|
|
};
|
|
|
|
const Players: React.FC<Props> = ({ players }) => (
|
|
<PageContainer>
|
|
<PlayerList players={players} />
|
|
</PageContainer>
|
|
);
|
|
|
|
export default Players;
|