From d23b4291d164e16f5e39f1118fba040d6f09d493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sat, 30 Jan 2021 14:01:20 +0900 Subject: [PATCH] style: import style, debug code removed --- pages/list/votes.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pages/list/votes.tsx b/pages/list/votes.tsx index 037dd9e..094cde1 100644 --- a/pages/list/votes.tsx +++ b/pages/list/votes.tsx @@ -4,7 +4,7 @@ import dynamic from 'next/dynamic' import { ParsedUrlQuery } from 'querystring' import { BotList } from '@types' -import * as Query from '@utils/Query' +import { get }from '@utils/Query' import NotFound from '../404' import { PageCount } from '@utils/Yup' @@ -34,12 +34,10 @@ const Votes:NextPage = ({ data }) => { } export const getServerSideProps = async (ctx:Context) => { let data: BotList - console.log(ctx.query.page) if(!ctx.query.page) ctx.query.page = '1' const validate = await PageCount.validate(ctx.query.page).then(el => el).catch(() => null) - console.log(validate) if(!validate || isNaN(Number(ctx.query.page))) data = null - else data = await Query.get.list.votes.load(Number(ctx.query.page)) + else data = await get.list.votes.load(Number(ctx.query.page)) return { props: { data