diff --git a/pages/addbot.tsx b/pages/addbot.tsx index 91789df..daa5a8b 100644 --- a/pages/addbot.tsx +++ b/pages/addbot.tsx @@ -8,6 +8,7 @@ import { get } from '@utils/Query' import { parseCookie, redirectTo } from '@utils/Tools' import { AddBotSubmitSchema } from '@utils/Yup' import { categories, library } from '@utils/Constants' +import { User } from '@types' const CheckBox = dynamic(() => import('@components/Form/CheckBox')) const Label = dynamic(() => import('@components/Form/Label')) @@ -23,16 +24,22 @@ const Container = dynamic(() => import('@components/Container')) const Message = dynamic(() => import('@components/Message')) const SEO = dynamic(() => import('@components/SEO')) -const AddBot:NextPage = ({ logged }) => { +const AddBot:NextPage = ({ logged, user }) => { const router = useRouter() - if(!logged) { + function toLogin() { localStorage.redirectTo = window.location.href redirectTo(router, 'login') + } + if(!logged) { + toLogin() return } return

새로운 봇 추가하기

+
+ 안녕하세요, {user.tag}님! 본인이 아니신가요? +
= ({ logged }) => { - {/*
-
- -
-
- -
-
*/} +