import { NextPage } from 'next' import dynamic from 'next/dynamic' import { Bot, List, Server } from '@types' import * as Query from '@utils/Query' 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 getServerSideProps = async () => { const bots = await Query.get.list.votes.load(1) const servers = await Query.get.serverList.votes.load(1) return { props: { bots, servers } } } interface IndexProps { bots: List servers: List } export default Index