diff --git a/src/components/board/BoardList.tsx b/src/components/board/BoardList.tsx
index b03dc4c..3130849 100644
--- a/src/components/board/BoardList.tsx
+++ b/src/components/board/BoardList.tsx
@@ -63,6 +63,7 @@ function BoardList(): JSX.Element {
useEffect(() => {
fetchBoardList(currentPage);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentPage, selectedCategory, status, keyword, search]);
diff --git a/src/components/board/reply/Reply.tsx b/src/components/board/reply/Reply.tsx
index 5090d6d..ce2ad07 100644
--- a/src/components/board/reply/Reply.tsx
+++ b/src/components/board/reply/Reply.tsx
@@ -36,6 +36,7 @@ const Reply = () => {
useEffect(() => {
GetReplyList();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [refresh])
diff --git a/src/components/member/Signup.tsx b/src/components/member/Signup.tsx
index 3eb3d1c..70fdce5 100644
--- a/src/components/member/Signup.tsx
+++ b/src/components/member/Signup.tsx
@@ -151,7 +151,7 @@ const Signup = () => {
+ sx={{ backgroundColor: '#969696', boxShadow: 'none', paddingY: 1 }} >중복확인
비밀번호
@@ -225,7 +225,7 @@ const Signup = () => {
+ sx={{ backgroundColor: '#969696', boxShadow: 'none', paddingY: 1 }} >중복확인
diff --git a/src/components/member/mypage/EditNick.tsx b/src/components/member/mypage/EditNick.tsx
index 222686a..c25404d 100644
--- a/src/components/member/mypage/EditNick.tsx
+++ b/src/components/member/mypage/EditNick.tsx
@@ -1,15 +1,16 @@
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom";
import api from "lib/api";
import useNicknameChecker from "lib/useNicknameChecker";
-import { Container, Typography, Grid, TextField, Box, Button, Card } from '@mui/material';
+import { Container, Typography, Grid, TextField, Box, Button, Card, Divider } from '@mui/material';
interface FormData {
nickname: string;
}
const EditNick = () => {
+ const [nowNick, setNowNick] = useState(String || null)
const { register, handleSubmit, formState: { errors } } = useForm({ mode: 'all' });
const navigate = useNavigate();
@@ -43,8 +44,16 @@ const EditNick = () => {
}
};
+ useEffect(() => {
+ getNick();
+ }, [setNowNick])
-
+ const getNick = async () => {
+ const result = await api.get("member/myInfo")
+ setNowNick(result.data.data.nickname)
+ console.log("nowNick:" + result.data.data.nickname)
+ }
+
return (
<>
@@ -59,32 +68,28 @@ const EditNick = () => {
padding: 4, backgroundColor: 'white'
}}
>
-
+
닉네임 변경
-
+
현재 닉네임
-
-
+
+ {nowNick}
+
- 새 닉네임
+
+
+
+
+ 바꿀 닉네임
-
+
{
+ sx={{ backgroundColor: '#969696', boxShadow: 'none' }} >중복확인
+
+
+
+
+
diff --git a/src/components/member/mypage/EditPw.tsx b/src/components/member/mypage/EditPw.tsx
index ea7fa4b..9607445 100644
--- a/src/components/member/mypage/EditPw.tsx
+++ b/src/components/member/mypage/EditPw.tsx
@@ -2,7 +2,7 @@ import { useRef } from "react";
import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom";
import api from "lib/api";
-import { Container, Typography, Grid, TextField, Box, Button, Card } from '@mui/material';
+import { Container, Typography, Grid, TextField, Box, Button, Card, Divider } from '@mui/material';
// components
interface FormData {
@@ -52,10 +52,11 @@ const EditPw = () => {
-
+
+
현재 비밀번호
-
+
{
/>
- 새 비밀번호
+
-
+
+ 바꿀 비밀번호
+
+
{
helperText={errors.updatePW?.message}
/>
-
- 새 비밀번호 확인
+
-
+
+ 비밀번호 확인
+
+
{
helperText={errors.passwordCheck?.message}
/>
+
+
+