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