diff --git a/pages/404.tsx b/pages/404.tsx index 07502d8..6fc0297 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -1,10 +1,8 @@ /* eslint-disable react/no-unstable-nested-components */ import React from 'react'; import ErrorPage from '@/public/icons/errorPageImage.svg'; -import { useRouter } from 'next/router'; export default function NoPostings() { - const router = useRouter(); const noPostingStyle = 'text-[20px] font-bold mt-[29px] text-center'; const containerStyle = 'flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경 diff --git a/pages/room/addRoom/step1.tsx b/pages/room/addRoom/step1.tsx index b612e09..9bbf26e 100644 --- a/pages/room/addRoom/step1.tsx +++ b/pages/room/addRoom/step1.tsx @@ -72,7 +72,7 @@ export default function Step1() { // 선택된 value와 label 값을 이용하여 원하는 작업 수행 setDongValue({ ...option, gu: guValue.value, guLabel: guValue.label }); }, - [guValue?.label, guValue?.value] + [guValue?.label, guValue?.value], ); const handleGuChange = useCallback((option: Option) => { diff --git a/pages/room/addRoom/step3.tsx b/pages/room/addRoom/step3.tsx index 0514eb8..633f077 100644 --- a/pages/room/addRoom/step3.tsx +++ b/pages/room/addRoom/step3.tsx @@ -1,3 +1,4 @@ +/* eslint-disable no-shadow */ import React, { useState } from 'react'; import { ImageListType } from 'react-images-uploading'; import ModalBox from '@/components/Modal/ModalBox.tsx'; diff --git a/pages/userInfo/editProfile.tsx b/pages/userInfo/editProfile.tsx index 013d5cb..bc04795 100644 --- a/pages/userInfo/editProfile.tsx +++ b/pages/userInfo/editProfile.tsx @@ -2,7 +2,7 @@ /* eslint-disable jsx-a11y/alt-text */ /* eslint-disable react/no-unstable-nested-components */ /* eslint-disable react/style-prop-object */ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; import { FieldValues, SubmitHandler, FieldError, useForm as UseForm } from 'react-hook-form'; import useModal from '@/hooks/useModal.ts'; import { isValidEmail, isRequired } from '@/utils/validCheck.ts'; @@ -10,11 +10,10 @@ import { Textarea, Button, Upload, Input, Calendar } from '@/components/index.ts import ProfileCamera from '@/public/icons/profileCamera.svg'; import { User, Profile } from '@/public/types/user'; import { modifyProfile } from '@/api/userInfo'; -import isEmpty from 'lodash-es/isEmpty'; interface ProfileProps { _imageSrc: string; - userInfo: User + userInfo: User; } interface ImageComponentClickProps { @@ -33,10 +32,9 @@ export default function EditProfile({ _imageSrc, userInfo }: ProfileProps) { handleSubmit, formState: { errors }, } = UseForm({ mode: 'onChange' }); - const capitalizeFirstLetter = (str: string) => { return (str || '').charAt(0).toUpperCase() + (str || '').slice(1).toLowerCase(); - } + }; const [buttonState, setButtonState] = useState(capitalizeFirstLetter(userInfo?.gender)); @@ -45,9 +43,7 @@ export default function EditProfile({ _imageSrc, userInfo }: ProfileProps) { const profileData = data as Profile; profileData.profileId = userInfo.id || 0; const result = await modifyProfile(profileData); - console.log("result in editprofile", result); alert('수정되었습니다'); - // openModal({ // props: { // title: 'My Postings', @@ -110,7 +106,6 @@ export default function EditProfile({ _imageSrc, userInfo }: ProfileProps) { ); }; - return (