diff --git a/README.md b/README.md
index 88fbb03d..6f1ddf4e 100644
--- a/README.md
+++ b/README.md
@@ -6,17 +6,14 @@
-> 서비스 바로가기
( 현재 리팩토링중인 서비스입니다 :) 5월 출시를 기다려주세요! )
+
+
+## [💗💗💗 서비스 바로가기 💗💗💗](https://www.moodmate.site/main)
+
+
-
diff --git a/public/sw.js.map b/public/sw.js.map
index 4c8a9ed9..8ef3b84e 100644
--- a/public/sw.js.map
+++ b/public/sw.js.map
@@ -1 +1 @@
-{"version":3,"file":"sw.js","sources":["../../../../../private/var/folders/j1/3yzh53wj1vx2zmdt31jlm_dc0000gn/T/71ce1223d07d16ee8de90f93ad7cc73e/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,EAEZ,CAAA;EAQDC,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;AAI3BC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA6B,CAAC,CAAA,CAAA,CAAG,CAAE,CAAA,CAAA,CAAA,CAAA,CAAIC,oBAA+B,CAAC,CAAA;EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAEC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA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AA,CAAA,CAAK,CAAC,CAAA;;"}
\ No newline at end of file
+{"version":3,"file":"sw.js","sources":["../../../../../private/var/folders/j1/3yzh53wj1vx2zmdt31jlm_dc0000gn/T/1ba5e82cd016c690c8741c074e92b13d/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/johyewon/Desktop/Leets/MoodMate-FE/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;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AA,CAAA,CAAA,CAACQ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC,CAAA;EAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAOR,QAAQ,CAAA;EAAC,CAAA,CAAA,CAAA,CAAA,CAAA;KAAG,CAAA;AAAE,CAAA,CAAA,CAAC,CAAC,CAAA,CAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC,CAAA;AACxWL,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA6B,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAE,CAAA,CAAA,CAAA,CAAA,CAAIc,mBAA8B,CAAC,CAAA;EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAC,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA;EAAEZ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,EAAE,CAAA,CAAA;EAAG,CAAC,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAA;;"}
\ No newline at end of file
diff --git a/src/app/_atom/userinfo.ts b/src/app/_atom/userinfo.ts
index 7a8a14d1..1868102d 100644
--- a/src/app/_atom/userinfo.ts
+++ b/src/app/_atom/userinfo.ts
@@ -35,3 +35,11 @@ export const editUserInfoState = atom
({
preferMood: '',
},
})
+
+export const editUserNickname = atom({
+ key: 'editUserNickname',
+ default: {
+ isNicknameEdit: false,
+ userNickname: '',
+ },
+})
diff --git a/src/app/_components/common/userinfo/UserNickname.tsx b/src/app/_components/common/userinfo/UserNickname.tsx
index 6f818909..dbf4cc63 100644
--- a/src/app/_components/common/userinfo/UserNickname.tsx
+++ b/src/app/_components/common/userinfo/UserNickname.tsx
@@ -8,6 +8,8 @@ import Input from '../Input'
import Loading from '../Loading'
import ErrorPage from '@/(route)/error'
import { useMyPageQuery } from '@/_hooks/useMypageQuery'
+import { useMutation } from '@tanstack/react-query'
+import { postCheckNickname } from '@/_service/mypage'
interface UserNicknameProps {
pageNum: string
@@ -17,6 +19,8 @@ interface UserNicknameProps {
const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
const [editUserInfo, setEditUserInfoState] = useRecoilState(editUserInfoState)
const route = useRouter()
+ const [canUseNickname, setCanUseNickname] = useState(false)
+ const [canNext, setCanNext] = useState(false)
const [nickname, setNickname] = useRecoilState(userInfoState)
const userInfo = useRecoilValue(userInfoState)
const [inputValue, setInputValue] = useState(
@@ -61,6 +65,7 @@ const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
const handleInputChange = (e: React.ChangeEvent) => {
const newValue = e.target.value.slice(0, INPUT_NICKNAME.MAX)
const koeranOnly = /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/g
+ setCanUseNickname(false)
if (!koeranOnly.test(newValue)) {
alert('한글만 입력 가능합니다.')
} else {
@@ -69,6 +74,14 @@ const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
}
}
+ useEffect(() => {
+ if (canUseNickname && inputValue.length > 0) {
+ setCanNext(true)
+ } else {
+ setCanNext(false)
+ }
+ }, [inputValue, canUseNickname])
+
const nextRoute = () => {
if (inputValue.trim() === '') {
alert('닉네임을 입력해주세요.')
@@ -87,6 +100,34 @@ const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
}
}
+ const postUserDataMutation = useMutation({
+ mutationFn: () => postCheckNickname(inputValue.trim()),
+ onSuccess: (data) => {
+ if (data.isDuplicate) {
+ setCanUseNickname(false)
+ alert('이미 사용중인 닉네임입니다.')
+ } else {
+ setCanUseNickname(true)
+ if (inputValue.length > 0) {
+ setCanNext(true)
+ }
+ alert('사용 가능한 닉네임입니다!')
+ }
+ },
+ onError: () => {
+ setCanUseNickname(false)
+ alert('다시 시도해 주세요.')
+ },
+ })
+
+ const checkCanUseNickname = () => {
+ if (inputValue.trim().length !== 0) {
+ postUserDataMutation.mutate()
+ } else {
+ alert('닉네임을 입력해주세요.')
+ }
+ }
+
const inputStyles = {
defaultStyles: 'bg-lightgray',
activeStyles: 'bg-primary',
@@ -125,8 +166,17 @@ const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
: inputStyles.defaultStyles
}`}
/>
-
- {NICK_NAME_PAGE.GUIDE}
+
+
+
+ {NICK_NAME_PAGE.GUIDE}
+
@@ -135,11 +185,9 @@ const UserNickname = ({ pageNum, isEdit }: UserNicknameProps) => {
onClick={nextRoute}
buttonType="userinfo"
className={`relative mb-7 rounded-md text-darkgray ${
- inputValue.length > 0
- ? buttonStyles.activeStyles
- : buttonStyles.defaultStyles
+ canNext ? buttonStyles.activeStyles : buttonStyles.defaultStyles
}`}
- isActive={inputValue.trim() !== ''}
+ isActive={canNext}
/>
)
diff --git a/src/app/_components/information/EditNickname.tsx b/src/app/_components/information/EditNickname.tsx
new file mode 100644
index 00000000..a4ab7f58
--- /dev/null
+++ b/src/app/_components/information/EditNickname.tsx
@@ -0,0 +1,133 @@
+'use client'
+
+import { useEffect, useState } from 'react'
+import Input from '../common/Input'
+import { INPUT_NICKNAME, NICK_NAME_PAGE } from '@/_constants/info'
+import { useRecoilState } from 'recoil'
+import { editUserNickname } from '@/_atom/userinfo'
+import { useMutation } from '@tanstack/react-query'
+import { postCheckNickname } from '@/_service/mypage'
+import { putUserNickname } from '@/_service/userinfo'
+import Icons from '../common/Icons'
+import { exit } from '@/_ui/IconsPath'
+
+interface EditNicknameProps {
+ userNickname: string
+}
+
+const EditNickname = ({ userNickname }: EditNicknameProps) => {
+ const [inputValue, setInputValue] = useState(userNickname)
+ const [inputCount, setinputCount] = useState(`${userNickname.length}/5`)
+ const [editUserInfo, setEditUserInfoState] = useRecoilState(editUserNickname)
+ const [canUseNickname, setCanUseNickname] = useState(false)
+
+ useEffect(() => {
+ setInputValue(userNickname)
+ setEditUserInfoState({ ...editUserInfo, userNickname: userNickname })
+ }, [])
+
+ const handleInputChange = (e: React.ChangeEvent