diff --git a/components/Advertisement.tsx b/components/Advertisement.tsx index d24bba0..73a4baa 100644 --- a/components/Advertisement.tsx +++ b/components/Advertisement.tsx @@ -1,25 +1,31 @@ import AdSense from 'react-adsense' const Advertisement: React.FC = ({ size = 'short' }) => { - return
-
- {process.env.NODE_ENV === 'production' ? ( - - ) : ( - 'Advertisement' - )} + return ( +
+
+ {process.env.NODE_ENV === 'production' ? ( + + ) : ( + 'Advertisement' + )} +
-
+ ) } declare global { diff --git a/components/Application.tsx b/components/Application.tsx index 90f9df2..3caa2db 100644 --- a/components/Application.tsx +++ b/components/Application.tsx @@ -7,17 +7,16 @@ const ServerIcon = dynamic(() => import('@components/ServerIcon')) const Application: React.FC = ({ type, id, name }) => { return ( -
- { - type === 'bot' ? - : - - } -

{name}

+
+ {type === 'bot' ? ( + + ) : ( + + )} +

{name}

) - } interface ApplicationProps { diff --git a/components/BotCard.tsx b/components/BotCard.tsx index 468518c..d78f493 100644 --- a/components/BotCard.tsx +++ b/components/BotCard.tsx @@ -11,18 +11,18 @@ const DiscordAvatar = dynamic(() => import('@components/DiscordAvatar')) const BotCard: React.FC = ({ manage = false, bot }) => { return ( -
+
@@ -30,15 +30,15 @@ const BotCard: React.FC = ({ manage = false, bot }) => {
-
+
-
+
@@ -55,19 +55,19 @@ const BotCard: React.FC = ({ manage = false, bot }) => {
-
+

{Status[bot.status]?.text}

-

{bot.name}

+

+ {bot.name} +

-

- {bot.intro} -

+

{bot.intro}

- {bot.category.slice(0, 3).map(el => ( + {bot.category.slice(0, 3).map((el) => ( ))}{' '} {bot.category.length > 3 && } @@ -80,35 +80,31 @@ const BotCard: React.FC = ({ manage = false, bot }) => {
- - 보기 - + className='w-full rounded-bl-2xl py-3 text-center text-sm font-bold text-koreanbots-blue transition duration-100 ease-in hover:bg-koreanbots-blue hover:text-white hover:shadow-lg' + > + 보기 {manage ? ( - - 관리하기 - + className='w-full rounded-br-2xl py-3 text-center text-sm font-bold text-emerald-500 transition duration-100 ease-in hover:bg-emerald-500 hover:text-white hover:shadow-lg' + > + 관리하기 - ) : bot.state !== 'ok' ? - 초대하기 - : + ) : bot.state !== 'ok' ? ( + + 초대하기 + + ) : ( - 초대하기 + 초대하기 - } + )}
@@ -117,7 +113,6 @@ const BotCard: React.FC = ({ manage = false, bot }) => {
) - } interface BotCardProps { @@ -125,4 +120,4 @@ interface BotCardProps { bot: Bot } -export default BotCard \ No newline at end of file +export default BotCard diff --git a/components/Button.tsx b/components/Button.tsx index 44cafe3..a151e28 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -6,33 +6,41 @@ const Button: React.FC = ({ className, children, href, - disabled=false, + disabled = false, onClick, }) => { - return href ? - - {children} - - - : onClick ? - : - + ) : ( + + ) } interface ButtonProps { diff --git a/components/Captcha.tsx b/components/Captcha.tsx index 25585cf..7418cd0 100644 --- a/components/Captcha.tsx +++ b/components/Captcha.tsx @@ -1,15 +1,20 @@ import { Ref } from 'react' import HCaptcha from '@hcaptcha/react-hcaptcha' - const Captcha: React.FC = ({ dark, onVerify }) => { - return + return ( + + ) } interface CaptchaProps { - dark: boolean - onVerify(token: string, eKey?: string): void - ref?: Ref + dark: boolean + onVerify(token: string, eKey?: string): void + ref?: Ref } -export default Captcha \ No newline at end of file +export default Captcha diff --git a/components/ColorCard.tsx b/components/ColorCard.tsx index 66f6c32..ef42301 100644 --- a/components/ColorCard.tsx +++ b/components/ColorCard.tsx @@ -3,7 +3,7 @@ const ColorCard: React.FC = ({ header, first, second, className

{header}

- {first} + {first}
{second}

diff --git a/components/DeveloperLayout.tsx b/components/DeveloperLayout.tsx index 3b4ba60..f3517bb 100644 --- a/components/DeveloperLayout.tsx +++ b/components/DeveloperLayout.tsx @@ -9,106 +9,169 @@ import { NextSeo } from 'next-seo' const Container = dynamic(() => import('@components/Container')) const Divider = dynamic(() => import('@components/Divider')) -const DeveloperLayout: React.FC = ({ children, enabled, docs, currentDoc }:DeveloperLayout) => { - const [ navbarEnabled, setNavbarOpen ] = useState(false) +const DeveloperLayout: React.FC = ({ + children, + enabled, + docs, + currentDoc, +}: DeveloperLayout) => { + const [navbarEnabled, setNavbarOpen] = useState(false) return ( -
- -
-
+
+ +
+
    -
  • - +
  • + + +
  • -
  • - +
  • + + +
  • - { - enabled === 'docs' && <> + {enabled === 'docs' && ( + <> -
  • setNavbarOpen(true)} onClick={() => setNavbarOpen(true)}> - -
  • - } +
  • setNavbarOpen(true)} + onClick={() => setNavbarOpen(true)} + > + +
  • + + )}
-
-
-
    -
  • setNavbarOpen(false)} onClick={() => setNavbarOpen(false)}>닫기
  • +
    +
    +
      +
    • setNavbarOpen(false)} + onClick={() => setNavbarOpen(false)} + > + 닫기 +
    • -
    • - 나의 리스트 +
    • + 나의 리스트
    • -
    • - 문서 +
    • + 문서
    - { - enabled === 'docs' && <> + {enabled === 'docs' && ( + <> -
      -
    • setNavbarOpen(false)} className='lg:hidden cursor-pointer py-1 px-4 rounded-md mb-2'> +
        +
      • setNavbarOpen(false)} + className='mb-2 cursor-pointer rounded-md px-4 py-1 lg:hidden' + > 닫기
      • - { - docs?.map(el => { - if(el.list) return ( + {docs?.map((el) => { + if (el.list) + return (
        - {el.name} -
          - { - el.list.map(e => - -
        • setNavbarOpen(false)} className={`cursor-pointer px-4 py-2 rounded-md ${currentDoc === e.name ? 'bg-discord-blurple text-white' : 'hover:text-gray-500 dark:hover:text-white'}`}> - {e.name} -
        • - - ) - } + + {el.name} + +
            + {el.list.map((e) => ( + +
          • setNavbarOpen(false)} + className={`cursor-pointer rounded-md px-4 py-2 ${ + currentDoc === e.name + ? 'bg-discord-blurple text-white' + : 'hover:text-gray-500 dark:hover:text-white' + }`} + > + {e.name} +
          • + + ))}
        ) - - return ( - -
      • setNavbarOpen(false)} className={`cursor-pointer py-2 px-4 rounded-md ${currentDoc === el.name ? 'bg-discord-blurple text-white' : 'hover:text-gray-500 dark:hover:text-white'}`}> - {el.name} -
      • - - ) - }) - } + + return ( + +
      • setNavbarOpen(false)} + className={`cursor-pointer rounded-md px-4 py-2 ${ + currentDoc === el.name + ? 'bg-discord-blurple text-white' + : 'hover:text-gray-500 dark:hover:text-white' + }`} + > + {el.name} +
      • + + ) + })}
      - } + )}
    -
    - - {children} - +
    + {children}
    ) } interface DeveloperLayout { - children: ReactNode - enabled: 'applications' | 'docs' + children: ReactNode + enabled: 'applications' | 'docs' docs?: DocsData[] currentDoc?: string } diff --git a/components/DiscordAvatar.tsx b/components/DiscordAvatar.tsx index 1238914..a6cbb48 100644 --- a/components/DiscordAvatar.tsx +++ b/components/DiscordAvatar.tsx @@ -4,20 +4,27 @@ import { KoreanbotsEndPoints } from '@utils/Constants' const Image = dynamic(() => import('@components/Image')) -const DiscordAvatar: React.FC = props => { - return - +const DiscordAvatar: React.FC = (props) => { + return ( + + ) } interface DiscordAvatarProps { alt?: string userID: string className?: string - size? : 128 | 256 | 512 + size?: 128 | 256 | 512 } interface ImageEvent extends Event { diff --git a/components/Docs.tsx b/components/Docs.tsx index f71d240..b9a6121 100644 --- a/components/Docs.tsx +++ b/components/Docs.tsx @@ -8,26 +8,28 @@ const Docs: React.FC = ({ title, header, description, subheader, chil const d = description || subheader return ( <> - -
    +
    -

    +

    {header}

    -

    +

    {description}

    -

    +

    {subheader}

    - +
    {children}
    diff --git a/components/Footer.tsx b/components/Footer.tsx index 93b2e06..b8f661d 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -9,16 +9,16 @@ const Toggle = dynamic(() => import('@components/Toggle')) const Footer: React.FC = ({ theme, setTheme }) => { return (
    -
    - +
    +
    -

    국내 디스코드의 모든 것을 한 곳에서.

    +

    + 국내 디스코드의 모든 것을 한 곳에서. +

    2020-2023 한국 디스코드 리스트, All rights reserved. - -
    +
    -

    한국 디스코드 리스트

    +

    한국 디스코드 리스트

    • @@ -50,7 +50,7 @@ const Footer: React.FC = ({ theme, setTheme }) => {
    -

    정책

    +

    정책

    • @@ -75,7 +75,7 @@ const Footer: React.FC = ({ theme, setTheme }) => {
    -

    커뮤니티

    +

    커뮤니티

      {/*
    • @@ -90,7 +90,7 @@ const Footer: React.FC = ({ theme, setTheme }) => {
    -

    기타

    +

    기타

    다크모드 import('@components/Button')) -const Forbidden:React.FC = () => { +const Forbidden: React.FC = () => { const router = useRouter() - return <> - -
    -
    -

    403

    -

    - {ErrorText[403]} -

    - -

    해당 작업을 수행할 수 있는 권한이 없습니다. 무언가 잘못된 것 같다면 문의해주세요.

    + return ( + <> + +
    +
    +

    403

    +

    {ErrorText[403]}

    + +

    + 해당 작업을 수행할 수 있는 권한이 없습니다. 무언가 잘못된 것 같다면 문의해주세요. +

    +
    -
    - + + ) } export default Forbidden diff --git a/components/Form/CheckBox.tsx b/components/Form/CheckBox.tsx index f72350b..ef91590 100644 --- a/components/Form/CheckBox.tsx +++ b/components/Form/CheckBox.tsx @@ -1,7 +1,14 @@ import { Field } from 'formik' const CheckBox: React.FC = ({ name, ...props }) => { - return + return ( + + ) } interface CheckBoxProps { diff --git a/components/Form/Input.tsx b/components/Form/Input.tsx index fc3980d..527d4ee 100644 --- a/components/Form/Input.tsx +++ b/components/Form/Input.tsx @@ -1,12 +1,16 @@ import { Field } from 'formik' const Input: React.FC = ({ name, placeholder, ...props }) => { - return + return ( + + ) } interface InputProps { diff --git a/components/Form/Label.tsx b/components/Form/Label.tsx index 45187d5..3e230be 100644 --- a/components/Form/Label.tsx +++ b/components/Form/Label.tsx @@ -6,28 +6,30 @@ const Label: React.FC = ({ error = null, grid = true, short = false, - required = false + required = false, }) => { - return