diff --git a/pages/bots/[id]/vote.tsx b/pages/bots/[id]/vote.tsx index 4cc084c..4632a01 100644 --- a/pages/bots/[id]/vote.tsx +++ b/pages/bots/[id]/vote.tsx @@ -1,14 +1,20 @@ +import { NextPage, NextPageContext } from 'next' +import Link from 'next/link' import dynamic from 'next/dynamic' +import { useRouter } from 'next/router' + import { Bot, User } from '@types' import { get } from '@utils/Query' -import { parseCookie } from '@utils/Tools' -import { NextPage, NextPageContext } from 'next' -import { useRouter } from 'next/router' +import { makeBotURL, parseCookie, checkBotFlag } from '@utils/Tools' + import { ParsedUrlQuery } from 'querystring' +import NotFound from 'pages/404' + + const Container = dynamic(() => import('@components/Container')) const DiscordAvatar = dynamic(() => import('@components/DiscordAvatar')) -const Divider = dynamic(() => import('@components/Divider')) +const Button = dynamic(() => import('@components/Button')) const Tag = dynamic(() => import('@components/Tag')) const Owner = dynamic(() => import('@components/Owner')) const Segment = dynamic(() => import('@components/Segment')) @@ -18,18 +24,32 @@ const Advertisement = dynamic(() => import('@components/Advertisement')) const Tooltip = dynamic(() => import('@components/Tooltip')) const Markdown = dynamic(() => import ('@components/Markdown')) -const VoteBot: NextPage = ({ vote, data }) => { +const VoteBot: NextPage = ({ data }) => { const router = useRouter() - if(!vote) router.push(`/bots/${router.query.id}`) + if(!data?.id) return + if((checkBotFlag(data.flags, 'trusted') || checkBotFlag(data.flags, 'partnered')) && data.vanity && data.vanity !== router.query.id) router.push(`/bots/${data.vanity}`) return - -
-

sadf

-
+ + + {data.name}으로 돌아가기 + + +
+ + {data.votes}} dark /> +

{data.name}

+

12시간 뒤에 다시 투표하실 수 있습니다.

+ +
+
+
} diff --git a/pages/index.tsx b/pages/index.tsx index 634032c..773bf8f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -21,7 +21,7 @@ const Index: NextPage = ({ votes, newBots, trusted }) => { 하트 랭킹

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

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