import { NextPage } from 'next' import dynamic from 'next/dynamic' import { Bot, List, Server } from '@types' import * as Query from '@utils/Query' import { PHASE_PRODUCTION_BUILD } from 'next/constants' const Advertisement = dynamic(() => import('@components/Advertisement')) const ResponsiveGrid = dynamic(() => import('@components/ResponsiveGrid')) const Container = dynamic(() => import('@components/Container')) const BotCard = dynamic(() => import('@components/BotCard')) const ServerCard = dynamic(() => import('@components/ServerCard')) const Hero = dynamic(() => import('@components/Hero')) const LongButton = dynamic(() => import('@components/LongButton')) const Index: NextPage = ({ bots, servers }) => { return ( <>

봇 리스트

하트를 많이 받은 봇들의 순위입니다!

{bots.data.slice(0, 8).map((bot) => ( ))} 봇 리스트 바로가기

서버 리스트

하트를 많이 받은 서버들의 순위입니다!

{servers.data.slice(0, 8).map((bot) => ( ))} 서버 리스트 바로가기
) } export const getStaticProps = async () => { if (process.env.NEXT_PHASE === PHASE_PRODUCTION_BUILD) { const list = { totalPage: 1, currentPage: 1, data: [], } return { props: { bots: list, servers: list, }, revalidate: 1, } } const bots = await Query.get.list.votes.load(1) const servers = await Query.get.serverList.votes.load(1) return { props: { bots, servers }, revalidate: 60 } } interface IndexProps { bots: List servers: List } export default Index