From a5a75eb81f41e4a823ccdb3896cbcafbe39ef952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Mon, 11 Jan 2021 22:53:49 +0900 Subject: [PATCH] chore: dynamic imports --- pages/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index c2f3dfa..87eb866 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,12 +1,14 @@ -import { NextPage, NextPageContext } from 'next' -import Advertisement from '../components/Advertisement' -import BotCard from '../components/BotCard' -import Container from '../components/Container' -import LongButton from '../components/LongButton' -import Wave from '../components/Wave' +import { NextPage, } from 'next' +import dynamic from 'next/dynamic' + import { BotList } from '../types' import { Query } from '../utils' +const Advertisement = dynamic(()=> import('../components/Advertisement')) +const Container = dynamic(()=> import('../components/Container')) +const BotCard = dynamic(()=> import('../components/BotCard')) +const Wave = dynamic(()=> import('../components/Wave')) + const Index: NextPage = ({ votes, newBots, trusted }) => { return ( <>