From 91ce3db5c151ed46d98e9578394d2fdc5c9f01c9 Mon Sep 17 00:00:00 2001 From: Seok93 Date: Mon, 26 Aug 2024 17:23:49 +0900 Subject: [PATCH] =?UTF-8?q?Formatting:=20#63=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20=EB=B3=80=EC=88=98=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/user/auth-form/LinkContainer.tsx | 2 +- src/components/user/auth-form/ProfileImageContainer.tsx | 2 +- src/constants/formValidationRules.ts | 8 ++++---- src/constants/regex.ts | 2 +- src/constants/settings.ts | 5 +++++ src/utils/reduceImageSize.ts | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/user/auth-form/LinkContainer.tsx b/src/components/user/auth-form/LinkContainer.tsx index 135e41d2..02a3e059 100644 --- a/src/components/user/auth-form/LinkContainer.tsx +++ b/src/components/user/auth-form/LinkContainer.tsx @@ -1,7 +1,7 @@ import { ChangeEvent, useState } from 'react'; import { FaPlus, FaMinus } from 'react-icons/fa6'; import { useFormContext } from 'react-hook-form'; -import { USER_SETTINGS } from '@constants/userSettings'; +import { USER_SETTINGS } from '@constants/settings'; import useToast from '@hooks/useToast'; type LinkContainerProps = { diff --git a/src/components/user/auth-form/ProfileImageContainer.tsx b/src/components/user/auth-form/ProfileImageContainer.tsx index 0ce7163f..6d516b84 100644 --- a/src/components/user/auth-form/ProfileImageContainer.tsx +++ b/src/components/user/auth-form/ProfileImageContainer.tsx @@ -2,7 +2,7 @@ import { GoPlusCircle } from 'react-icons/go'; import { FaRegTrashCan } from 'react-icons/fa6'; import { useFormContext } from 'react-hook-form'; import { convertBytesToString } from '@utils/converter'; -import { USER_SETTINGS } from '@constants/userSettings'; +import { USER_SETTINGS } from '@constants/settings'; import useToast from '@hooks/useToast'; type ProfileImageContainerProps = { diff --git a/src/constants/formValidationRules.ts b/src/constants/formValidationRules.ts index 2a532af6..d695f580 100644 --- a/src/constants/formValidationRules.ts +++ b/src/constants/formValidationRules.ts @@ -1,9 +1,9 @@ import Validator from '@utils/Validator'; import { deepFreeze } from '@utils/deepFreeze'; -import { EMAIL_REGEX, ID_REGEX, NICKNAME_REGEX, PASSWORD_REGEX } from './regex'; -import { USER_SETTINGS } from './userSettings'; -import { Project } from '@/types/ProjectType'; -import { Task } from '@/types/TaskType'; +import { EMAIL_REGEX, ID_REGEX, NICKNAME_REGEX, PASSWORD_REGEX } from '@constants/regex'; +import { USER_SETTINGS } from '@constants/settings'; +import type { Project } from '@/types/ProjectType'; +import type { Task } from '@/types/TaskType'; type ValidateOption = { [key: string]: (value: string) => string | boolean }; diff --git a/src/constants/regex.ts b/src/constants/regex.ts index bc24e5c4..8594a19c 100644 --- a/src/constants/regex.ts +++ b/src/constants/regex.ts @@ -1,4 +1,4 @@ -import { USER_SETTINGS } from './userSettings'; +import { USER_SETTINGS } from '@constants/settings'; export const EMAIL_REGEX = /^[a-z0-9._%+-]+@[a-z0-9-]+\.[a-z]{2,3}(?:\.[a-z]{2,3})?$/i; export const PHONE_REGEX = /^01([0|1|6|7|8|9])-?([0-9]{3,4})-?([0-9]{4})$/; diff --git a/src/constants/settings.ts b/src/constants/settings.ts index eaf50b33..240b5b7e 100644 --- a/src/constants/settings.ts +++ b/src/constants/settings.ts @@ -11,3 +11,8 @@ export const USER_SETTINGS = Object.freeze({ MAX_NICKNAME_LENGTH: 20, MAX_EMAIL_LENGTH: 128, }); + +export const TASK_SETTINGS = Object.freeze({ + MAX_FILE_SIZE: 2 * MB, + MAX_FILE_COUNT: 10, +}); diff --git a/src/utils/reduceImageSize.ts b/src/utils/reduceImageSize.ts index 13bdc37f..c7c81557 100644 --- a/src/utils/reduceImageSize.ts +++ b/src/utils/reduceImageSize.ts @@ -1,4 +1,4 @@ -import { USER_SETTINGS } from '@/constants/userSettings'; +import { USER_SETTINGS } from '@constants/settings'; const reduceImageSize = (objUrl: string) => { return new Promise((resolve, reject) => {