From aeccd1ae1d96f9d77930b9491b4207f76b9197f2 Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Thu, 25 Mar 2021 15:54:45 +0900 Subject: [PATCH] feat: added calculator link --- pages/addbot.tsx | 5 +++++ pages/manage/[id].tsx | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/pages/addbot.tsx b/pages/addbot.tsx index aa8d07f..7163268 100644 --- a/pages/addbot.tsx +++ b/pages/addbot.tsx @@ -138,6 +138,11 @@ const AddBot:NextPage = ({ logged, user, csrfToken, theme }) => { { values.category.includes('빗금 명령어') && diff --git a/pages/manage/[id].tsx b/pages/manage/[id].tsx index 4b86b11..15acafa 100644 --- a/pages/manage/[id].tsx +++ b/pages/manage/[id].tsx @@ -2,14 +2,15 @@ import { NextPage, NextPageContext } from 'next' import { useState } from 'react' import { useRouter } from 'next/router' import dynamic from 'next/dynamic' +import Link from 'next/link' import { Form, Formik } from 'formik' import { ParsedUrlQuery } from 'node:querystring' import { get } from '@utils/Query' import { checkUserFlag, cleanObject, makeBotURL, parseCookie, redirectTo } from '@utils/Tools' -import { AddBotSubmit, ManageBot, ManageBotSchema } from '@utils/Yup' +import { ManageBot, ManageBotSchema } from '@utils/Yup' import { categories, library } from '@utils/Constants' -import { Bot, ResponseProps, SubmittedBot, Theme, User } from '@types' +import { Bot, Theme, User } from '@types' import { getToken } from '@utils/Csrf' import Fetch from '@utils/Fetch' @@ -19,6 +20,7 @@ import Forbidden from '@components/Forbidden' const Label = dynamic(() => import('@components/Form/Label')) const Input = dynamic(() => import('@components/Form/Input')) const Divider = dynamic(() => import('@components/Divider')) +const Redirect = dynamic(() => import('@components/Redirect')) const TextArea = dynamic(() => import('@components/Form/TextArea')) const Segment = dynamic(() => import('@components/Segment')) const Markdown = dynamic(() => import('@components/Markdown')) @@ -78,11 +80,13 @@ const ManageBotPage:NextPage = ({ bot, user, csrfToken, theme }) { data ? data.code === 200 ?
- -

정보를 저장했습니다.

-

반영까지는 시간이 조금 걸릴 수 있습니다!

- {redirectTo(router, makeBotURL(bot))} -
+ + +

정보를 저장했습니다.

+

반영까지는 시간이 조금 걸릴 수 있습니다!

+
+
+
:

{data.message || '오류가 발생했습니다.'}

@@ -113,6 +117,11 @@ const ManageBotPage:NextPage = ({ bot, user, csrfToken, theme }) { values.category.includes('빗금 명령어') &&