import { NextPage } from 'next' import dynamic from 'next/dynamic' import { Bot, List } from '@types' import * as Query from '@utils/Query' import LongButton from '@components/LongButton' 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 Paginator = dynamic(() => import('@components/Paginator')) const Hero = dynamic(() => import('@components/Hero')) const Index: NextPage = ({ votes, newBots, trusted }) => { return ( <>

하트 랭킹

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

{votes.data.map((bot) => ( ))}

신뢰된 봇

한국 디스코드 리스트에서 인증받은 신뢰할 수 있는 봇들입니다!!

{trusted.data.slice(0, 4).map((bot) => ( ))} {trusted.data.length > 4 && ( 더보기 )}

새로운 봇

최근에 한국 디스코드 리스트에 추가된 따끈따끈한 봇입니다.

{newBots.data.slice(0, 4).map((bot) => ( ))} 더보기
) } export const getStaticProps = async () => { if (process.env.NEXT_PHASE === PHASE_PRODUCTION_BUILD) { const list = { totalPage: 1, currentPage: 1, data: [], } return { props: { votes: list, newBots: list, trusted: list, }, revalidate: 1, } } const votes = await Query.get.list.votes.load(1) const newBots = await Query.get.list.new.load(1) const trusted = await Query.get.list.trusted.load(1) return { props: { votes, newBots, trusted }, revalidate: 60 } } interface IndexProps { votes: List newBots: List trusted: List } export default Index