Date: Thu, 14 Mar 2024 12:51:50 +0900
Subject: [PATCH 37/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20HOC?=
=?UTF-8?q?=EC=97=90=20params=EC=9D=98=20id=EA=B0=80=20=EB=B3=B8=EC=9D=B8?=
=?UTF-8?q?=EC=9D=B8=EC=A7=80=20=EC=95=84=EB=8B=8C=EC=A7=80=20=EC=B2=B4?=
=?UTF-8?q?=ED=81=AC=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=B6=94?=
=?UTF-8?q?=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/ProfilePage/components/HOC/withUserId.tsx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/pages/ProfilePage/components/HOC/withUserId.tsx b/src/pages/ProfilePage/components/HOC/withUserId.tsx
index 500b27e1..a01f2f0c 100644
--- a/src/pages/ProfilePage/components/HOC/withUserId.tsx
+++ b/src/pages/ProfilePage/components/HOC/withUserId.tsx
@@ -1,22 +1,29 @@
import { ComponentType } from "react"
import { useParams } from "react-router-dom"
+import { useUserInfoData } from "@services/caches/useUserInfoData"
+
export interface UserIdProps {
userId: string
+ isMe: boolean
}
const withUserId = (
WrappedComponent: ComponentType
,
) => {
const ComponentWithUserId = (props: Omit
) => {
const { userId } = useParams()
+ const data = useUserInfoData()
+ const isMe = Number(userId) === data?.id
if (!userId) {
return null
}
+
return (
)
}
From 15b9bbc2df29223980b61a127576954627cd08b8 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 12:51:51 +0900
Subject: [PATCH 38/58] =?UTF-8?q?[Chore=20=F0=9F=9A=80]=20=EB=B9=8C?=
=?UTF-8?q?=EB=93=9C=20=EC=8B=A4=ED=8C=A8=ED=95=9C=20=EA=B2=BD=EB=A1=9C=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/services/caches/useUserInfoData.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/services/caches/useUserInfoData.ts b/src/services/caches/useUserInfoData.ts
index 6114d475..25df4eae 100644
--- a/src/services/caches/useUserInfoData.ts
+++ b/src/services/caches/useUserInfoData.ts
@@ -1,7 +1,7 @@
-import { postEmailAuth } from "@api/auth/postEmailAuth"
-
import { useQuery } from "@tanstack/react-query"
+import { postEmailAuth } from "@apis/auth/postEmailAuth"
+
import { QUERYKEY } from "@constants/queryKey"
export const useUserInfoData = () => {
From cb490d914fe0d1ae6cead3ae368e720d3aea7c5e Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:52:40 +0900
Subject: [PATCH 39/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EB=84=A4=EC=9D=B4=EC=85=98=20?=
=?UTF-8?q?=EC=B4=88=EA=B8=B0=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B3=80?=
=?UTF-8?q?=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/ProfilePage/components/Projects/ProjectsGrid.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/ProfilePage/components/Projects/ProjectsGrid.tsx b/src/pages/ProfilePage/components/Projects/ProjectsGrid.tsx
index a8893bbc..ef6038b0 100644
--- a/src/pages/ProfilePage/components/Projects/ProjectsGrid.tsx
+++ b/src/pages/ProfilePage/components/Projects/ProjectsGrid.tsx
@@ -22,7 +22,7 @@ interface ProjectsGridProps {
type: string
}
const ProjectsGrid = ({ userId, type }: ProjectsGridProps) => {
- const [page, setPage] = useState(0)
+ const [page, setPage] = useState(1)
const { data } = useUserProjects({
userId: Number(userId),
type: type,
From 14c986ae5b2755978b8956d33ccf6deb1116ca8f Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:52:52 +0900
Subject: [PATCH 40/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C?=
=?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/Projects/ProjectsLiked.tsx | 46 -------------------
1 file changed, 46 deletions(-)
delete mode 100644 src/pages/ProfilePage/components/Projects/ProjectsLiked.tsx
diff --git a/src/pages/ProfilePage/components/Projects/ProjectsLiked.tsx b/src/pages/ProfilePage/components/Projects/ProjectsLiked.tsx
deleted file mode 100644
index a5e43976..00000000
--- a/src/pages/ProfilePage/components/Projects/ProjectsLiked.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { Grid, GridItem } from "@chakra-ui/react"
-
-import ProjectCard from "@components/ProjectCard/ProjectCard"
-
-import { useLikedProjects } from "./Projects.model"
-
-const ProjectsLiked = () => {
- const { data } = useLikedProjects()
-
- const { projects } = data || {}
-
- return (
-
- {projects &&
- projects
- .filter((project) => project.isLiked === true)
- .map(
- ({
- id,
- thumbnailUrl,
- viewCount,
- likeCount,
- isLiked,
- name,
- subName,
- }) => (
-
-
-
- ),
- )}
-
- )
-}
-
-export default ProjectsLiked
From 77e1b4372b6086152affad27eca347eeec4e07bb Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:55:39 +0900
Subject: [PATCH 41/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B3=B8=EC=9D=B8=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=97=AC?=
=?UTF-8?q?=EB=B6=80=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=B3=B4=EC=97=AC?=
=?UTF-8?q?=EC=A7=80=EB=8A=94=20=ED=83=AD=20=EC=A1=B0=EA=B1=B4=EB=B6=80=20?=
=?UTF-8?q?=EB=A0=8C=EB=8D=94=EB=A7=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/Projects/Projects.view.tsx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/pages/ProfilePage/components/Projects/Projects.view.tsx b/src/pages/ProfilePage/components/Projects/Projects.view.tsx
index 93297ead..aa70a7f3 100644
--- a/src/pages/ProfilePage/components/Projects/Projects.view.tsx
+++ b/src/pages/ProfilePage/components/Projects/Projects.view.tsx
@@ -9,15 +9,14 @@ import {
import { tabsType } from "@pages/ProfilePage/constants/constants"
import StyledTab from "@pages/ProfilePage/styles/StyledTab"
-import { ProjectsType } from "@pages/ProfilePage/types/types"
import withUserId, { UserIdProps } from "../HOC/withUserId"
import ProjectsGrid from "./ProjectsGrid"
-const ProjectsView = ({ userId }: UserIdProps) => {
+const ProjectsView = ({ userId, isMe }: UserIdProps) => {
const [isLargerThan500] = useMediaQuery("(min-width: 500px)")
- const projectsType: ProjectsType[] = ["JOINED", "LIKED", "COMMENTED"]
+ const projectsType = isMe ? ["JOINED", "LIKED", "COMMENTED"] : ["JOINED"]
return (
{
},
}}>
{tabsType.JOINED}
- {tabsType.LIKED}
- {tabsType.COMMENTED}
+ {isMe && (
+ <>
+ {tabsType.LIKED}
+ {tabsType.COMMENTED}
+ >
+ )}
{projectsType.map((type) => (
From f05c456dca4aa8a607b0f108dadf20a03eded051 Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:55:55 +0900
Subject: [PATCH 42/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B3=B8=EC=9D=B8=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=97=AC?=
=?UTF-8?q?=EB=B6=80=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=B3=B4=EC=97=AC?=
=?UTF-8?q?=EC=A7=80=EB=8A=94=20=EB=B2=84=ED=8A=BC=20=EC=A1=B0=EA=B1=B4?=
=?UTF-8?q?=EB=B6=80=20=EB=A0=8C=EB=8D=94=EB=A7=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProfilePage/components/Profile/ProfileCard.tsx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/pages/ProfilePage/components/Profile/ProfileCard.tsx b/src/pages/ProfilePage/components/Profile/ProfileCard.tsx
index 96aee331..1e529593 100644
--- a/src/pages/ProfilePage/components/Profile/ProfileCard.tsx
+++ b/src/pages/ProfilePage/components/Profile/ProfileCard.tsx
@@ -2,9 +2,10 @@ import { Avatar, Text, VStack } from "@chakra-ui/react"
import { ProfileActionsButtonsProps } from "@pages/ProfilePage/types/types"
+import withUserId, { UserIdProps } from "../HOC/withUserId"
import ProfileActionsButtons from "./ProfileActionsButtons"
-interface ProfileCardProps extends ProfileActionsButtonsProps {
+interface ProfileCardProps extends ProfileActionsButtonsProps, UserIdProps {
profileImageUrl?: string
nickname?: string
career?: string | null
@@ -16,6 +17,7 @@ const ProfileCard = ({
career,
handleNewProject,
handleEditProfile,
+ isMe,
}: ProfileCardProps) => {
return (
@@ -36,9 +38,11 @@ const ProfileCard = ({
{career} 개발자
)}
-
+ {isMe && (
+
+ )}
)
}
-export default ProfileCard
+export default withUserId(ProfileCard)
From 5b91b51165807028cee12755baa821268315965d Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:57:06 +0900
Subject: [PATCH 43/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C?=
=?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/Projects/ProjectsOwned.tsx | 26 -------------------
1 file changed, 26 deletions(-)
delete mode 100644 src/pages/ProfilePage/components/Projects/ProjectsOwned.tsx
diff --git a/src/pages/ProfilePage/components/Projects/ProjectsOwned.tsx b/src/pages/ProfilePage/components/Projects/ProjectsOwned.tsx
deleted file mode 100644
index df1a86d4..00000000
--- a/src/pages/ProfilePage/components/Projects/ProjectsOwned.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Grid, GridItem } from "@chakra-ui/react"
-
-import ProjectCard from "@components/ProjectCard/ProjectCard"
-
-const ProjectsOwned = () => {
- return (
-
- {Array.from({ length: 30 }, (_, idx) => idx + 1).map((idx) => (
-
-
-
- ))}
-
- )
-}
-export default ProjectsOwned
From bb737ed2e7198f4ee14c4abf28d3597aa06fb2a3 Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:57:29 +0900
Subject: [PATCH 44/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C?=
=?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProfilePage/components/Projects/ProjectsCommented.tsx | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 src/pages/ProfilePage/components/Projects/ProjectsCommented.tsx
diff --git a/src/pages/ProfilePage/components/Projects/ProjectsCommented.tsx b/src/pages/ProfilePage/components/Projects/ProjectsCommented.tsx
deleted file mode 100644
index b47b545e..00000000
--- a/src/pages/ProfilePage/components/Projects/ProjectsCommented.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-const ProjectsCommented = () => {
- return 내가 댓글단 프로젝트들
-}
-
-export default ProjectsCommented
From 88d6609407e7b2675ab66831a413acb5aae6f00a Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 12:58:33 +0900
Subject: [PATCH 45/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20theme?=
=?UTF-8?q?=20=ED=8F=B0=ED=8A=B8=20=EC=BB=AC=EB=9F=AC=20=EC=82=AC=EC=9A=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/ProfilePage/components/Projects/Projects.view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/ProfilePage/components/Projects/Projects.view.tsx b/src/pages/ProfilePage/components/Projects/Projects.view.tsx
index aa70a7f3..1e6fedbe 100644
--- a/src/pages/ProfilePage/components/Projects/Projects.view.tsx
+++ b/src/pages/ProfilePage/components/Projects/Projects.view.tsx
@@ -30,7 +30,7 @@ const ProjectsView = ({ userId, isMe }: UserIdProps) => {
h="6rem"
sx={{
"& > *": {
- _selected: { fontFamily: "SCDream_Bold", color: "#000000" },
+ _selected: { fontFamily: "SCDream_Bold", color: "black.100" },
},
}}>
{tabsType.JOINED}
From dac468b13cbe91381d8c7598045c4386c4a2a943 Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 13:03:25 +0900
Subject: [PATCH 46/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20Profile?=
=?UTF-8?q?Card=20minH=20=EB=8C=80=EC=8B=A0=20margin=EC=9C=BC=EB=A1=9C=20?=
=?UTF-8?q?=EB=86=92=EC=9D=B4=20=EC=A1=B0=EC=A0=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/ProfilePage/styles/StyledProfileCardBox.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pages/ProfilePage/styles/StyledProfileCardBox.tsx b/src/pages/ProfilePage/styles/StyledProfileCardBox.tsx
index cfb54d92..7a493bef 100644
--- a/src/pages/ProfilePage/styles/StyledProfileCardBox.tsx
+++ b/src/pages/ProfilePage/styles/StyledProfileCardBox.tsx
@@ -5,7 +5,8 @@ import { Flex } from "@chakra-ui/react"
const StyledProfileCardBox = ({ children }: React.PropsWithChildren) => {
return (
From ebd2657952b24bb627c55afcd3ce5e934a2dd929 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 13:40:04 +0900
Subject: [PATCH 47/58] =?UTF-8?q?[Chore=20=F0=9F=9A=80]=20api=20=ED=8F=B4?=
=?UTF-8?q?=EB=8D=94=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=EC=9C=BC?=
=?UTF-8?q?=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20import=20=EC=97=90=EB=9F=AC=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/ProjectEditPage/hooks/usePostFileMutation.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pages/ProjectEditPage/hooks/usePostFileMutation.ts b/src/pages/ProjectEditPage/hooks/usePostFileMutation.ts
index 8bdcc13f..4727fde6 100644
--- a/src/pages/ProjectEditPage/hooks/usePostFileMutation.ts
+++ b/src/pages/ProjectEditPage/hooks/usePostFileMutation.ts
@@ -1,9 +1,10 @@
-import { postProjectFiles } from "@api/projectFile/postProjectFiles"
import { postProjectFilesResponseType } from "api-models"
import { AxiosError } from "axios"
import { UseMutationOptions, useMutation } from "@tanstack/react-query"
+import { postProjectFiles } from "@apis/projectFile/postProjectFiles"
+
import { PostFormDataType } from "../types/PostFormDataType"
import { TypedFormData } from "../types/TypedFormDataValue"
From c20dd5f68b7380bb18362ce92489f7253d93837a Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 13:48:49 +0900
Subject: [PATCH 48/58] =?UTF-8?q?[Chore=20=F0=9F=9A=80]=20import=20?=
=?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/mocks/handlers.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts
index c05010ec..47217bba 100644
--- a/src/mocks/handlers.ts
+++ b/src/mocks/handlers.ts
@@ -3,10 +3,10 @@ import { searchHandlers } from "@components/Search/mocks"
import allProjectHandlers from "@pages/HomePage/mocks"
import { projectsHandlers, userInfoHandlers } from "@pages/ProfilePage/mocks"
import { projectDetailHandlers } from "@pages/ProjectDetailPage/mocks"
+import { projectEditHandler } from "@pages/ProjectEditPage/mocks"
import { postDoubleCheckEmail } from "@pages/SignUpPage/mocks/postDoubleCheckEmail.mock"
import { postDoubleCheckNickname } from "@pages/SignUpPage/mocks/postDoubleCheckNickname.mock"
import { postEmailSignUp } from "@pages/SignUpPage/mocks/postEmailSignUp.mock"
-import { projectEditHandler } from "@pages/ProjectEditPage/mocks"
import { postEmailAuth } from "./auth/postEmailAuth.mock"
import { postEmailLogin } from "./auth/postEmailLogin.mock"
From 41b281e3912fb81d6f045841d019e8bc4789b865 Mon Sep 17 00:00:00 2001
From: hellosonic-r
Date: Thu, 14 Mar 2024 13:53:44 +0900
Subject: [PATCH 49/58] =?UTF-8?q?[Refactor=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=EC=BD=98=EC=86=94=20=EC=A0=9C=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Pagination/Pagination.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/components/Pagination/Pagination.tsx b/src/components/Pagination/Pagination.tsx
index 88256c6b..17a161d4 100644
--- a/src/components/Pagination/Pagination.tsx
+++ b/src/components/Pagination/Pagination.tsx
@@ -12,7 +12,6 @@ interface PaginationProps {
const Pagination = ({ totalProjectsCount, setPage }: PaginationProps) => {
const handlePageChange = (page: number) => {
- // console.log(`${page}렌더`)
setPage(page)
}
return (
From 29bab670765d47d19daf32cd56863933972f6685 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 13:54:25 +0900
Subject: [PATCH 50/58] =?UTF-8?q?[Chore=20=F0=9F=9A=80]=20useEffect?=
=?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20?=
=?UTF-8?q?=EC=A2=85=EC=86=8D=EC=84=B1=20=EC=B6=94=EA=B0=80=20=EB=B0=A9?=
=?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=EB=A6=B0=ED=8A=B8=20?=
=?UTF-8?q?=EB=AC=B4=EC=8B=9C=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/SignUpForm/components/DoubleCheckButton.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pages/SignUpPage/components/SignUpForm/components/DoubleCheckButton.tsx b/src/pages/SignUpPage/components/SignUpForm/components/DoubleCheckButton.tsx
index 08175bcb..139732a2 100644
--- a/src/pages/SignUpPage/components/SignUpForm/components/DoubleCheckButton.tsx
+++ b/src/pages/SignUpPage/components/SignUpForm/components/DoubleCheckButton.tsx
@@ -31,6 +31,7 @@ const DoubleCheckButton = ({
title: successMessage,
})
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isDuplicated])
return (
From afd14ae461c2eac4b40e3779f62aac07214d52e7 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 14:06:53 +0900
Subject: [PATCH 51/58] =?UTF-8?q?[Chore=20=F0=9F=9A=80]=20useEffect?=
=?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=A6=B0=ED=8A=B8=20=EB=AC=B4=EC=8B=9C=20?=
=?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/SignUpPage/hooks/useSignUpForm.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pages/SignUpPage/hooks/useSignUpForm.ts b/src/pages/SignUpPage/hooks/useSignUpForm.ts
index c8ff9ae5..03fda7db 100644
--- a/src/pages/SignUpPage/hooks/useSignUpForm.ts
+++ b/src/pages/SignUpPage/hooks/useSignUpForm.ts
@@ -108,6 +108,7 @@ export const useSignUpForm = () => {
title: message,
})
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [signUp.error])
return {
From 8bf957443e513b105c1ea70db9ed08fecf1aad4f Mon Sep 17 00:00:00 2001
From: Whoknow77
Date: Thu, 14 Mar 2024 14:46:35 +0900
Subject: [PATCH 52/58] =?UTF-8?q?[Feat=20=E2=9C=8F=EF=B8=8F]=20=EC=A2=8B?=
=?UTF-8?q?=EC=95=84=EC=9A=94=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/like/deleteLike.ts | 7 +++++
src/api/like/postLike.ts | 13 +++++++--
src/constants/endPoints.ts | 5 ++--
.../components/Hoc/withProjectId.tsx | 25 +++++++++++++++++
.../Summary/SummaryTop/SummaryTop.tsx | 2 +-
.../Summary/SummaryTop/SummaryTopIcon.tsx | 28 +++++++++++++++----
.../hooks/mutations/useDeleteLikeMutation.ts | 0
.../hooks/mutations/usePostLikeMutation.ts | 24 ++++++++++++++++
src/types/domain/apiDomain.d.ts | 1 -
9 files changed, 93 insertions(+), 12 deletions(-)
create mode 100644 src/api/like/deleteLike.ts
create mode 100644 src/pages/ProjectDetailPage/components/Hoc/withProjectId.tsx
create mode 100644 src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
create mode 100644 src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
diff --git a/src/api/like/deleteLike.ts b/src/api/like/deleteLike.ts
new file mode 100644
index 00000000..b85aaf3b
--- /dev/null
+++ b/src/api/like/deleteLike.ts
@@ -0,0 +1,7 @@
+import { authInstance } from "@api/axiosInstance"
+
+import { ENDPOINTS } from "@constants/endPoints"
+
+export const deleteLike = async () => {
+ await authInstance.post(ENDPOINTS.UPLOAD_LIKE)
+}
diff --git a/src/api/like/postLike.ts b/src/api/like/postLike.ts
index c784d4af..c7646321 100644
--- a/src/api/like/postLike.ts
+++ b/src/api/like/postLike.ts
@@ -1,8 +1,15 @@
+import { postLikePayload } from "api-models"
+import { AxiosRequestConfig } from "axios"
+
import { ENDPOINTS } from "@constants/endPoints"
import { authInstance } from "../axiosInstance"
-//FIXME: 미완성 api
-export const postLike = async () => {
- await authInstance.post(ENDPOINTS.UPLOAD_LIKE)
+export const postLike = async (
+ { ...data }: postLikePayload,
+ config: AxiosRequestConfig = {},
+) => {
+ await authInstance.post(ENDPOINTS.POST_LIKE, data, {
+ ...config,
+ })
}
diff --git a/src/constants/endPoints.ts b/src/constants/endPoints.ts
index b4440f2b..2e3839ef 100644
--- a/src/constants/endPoints.ts
+++ b/src/constants/endPoints.ts
@@ -23,8 +23,9 @@ export const ENDPOINTS = {
GET_PROJECT_DETAILS: (projectId: number) =>
`${VARIABLE_URL}/projects/${projectId}`,
GET_ALL_PROJECTS: `${VARIABLE_URL}/projects`,
- UPLOAD_LIKE: `${VARIABLE_URL}/likes`,
- POST_COMMENT: () => `${VARIABLE_URL}/comments`,
+ POST_LIKE: `${VARIABLE_URL}/likes`,
+ DELETE_LIKE: (likeId: number) => `${VARIABLE_URL}/likes/${likeId}`,
+ POST_COMMENT: `${VARIABLE_URL}/comments`,
DELETE_COMMENT: (commentId: number) =>
`${VARIABLE_URL}/comments/${commentId}`,
EDIT_COMMENT: (commentId: number) => `${VARIABLE_URL}/comments/${commentId}`,
diff --git a/src/pages/ProjectDetailPage/components/Hoc/withProjectId.tsx b/src/pages/ProjectDetailPage/components/Hoc/withProjectId.tsx
new file mode 100644
index 00000000..46ad3764
--- /dev/null
+++ b/src/pages/ProjectDetailPage/components/Hoc/withProjectId.tsx
@@ -0,0 +1,25 @@
+import { ComponentType } from "react"
+import { useParams } from "react-router-dom"
+
+export interface ProjectIdProps {
+ projectId: string
+}
+
+export const withProjectId = (
+ WrappedComponent: ComponentType
,
+) => {
+ const ComponentWithProjectId = (props: Omit
) => {
+ const { projectId } = useParams()
+
+ if (!projectId) {
+ return null
+ }
+ return (
+
+ )
+ }
+ return ComponentWithProjectId
+}
diff --git a/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTop.tsx b/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTop.tsx
index 126e07a5..af6373b3 100644
--- a/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTop.tsx
+++ b/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTop.tsx
@@ -48,7 +48,7 @@ const SummaryTop = ({
}
- aria-label="goodButton"
+ aria-label="likeButton"
fontSize={isLargerThan1200 ? "2.7rem" : "2rem"}
/>
{
+const SummaryTopIcon = ({
+ count,
+ projectId,
+ ...props
+}: SummaryTopIconProps) => {
+ const { postLikeMutation } = usePostLikeMutation()
const [isLargerThan1200] = useMediaQuery(["(min-width: 1200px)"])
const isButton = props["aria-label"].toLowerCase().includes("button")
-
+ const isLike = props["aria-label"].toLowerCase().includes("like")
+ console.log(isLike)
return (
-
+ {isLike ? (
+ {
+ postLikeMutation.mutate({ projectId: Number(projectId) })
+ }}
+ {...props}
+ />
+ ) : (
+
+ )}
{count}
)
}
-export default SummaryTopIcon
+export default withProjectId(SummaryTopIcon)
diff --git a/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts b/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts b/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
new file mode 100644
index 00000000..71c4cf1b
--- /dev/null
+++ b/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
@@ -0,0 +1,24 @@
+import { postLike } from "@api/like/postLike"
+import { postLikePayload } from "api-models"
+
+import { useMutation, useQueryClient } from "@tanstack/react-query"
+
+import { QUERY_KEY_GET_PROJECT_DETAIL } from "../queries/useProjectDetailQuery"
+
+const QUERY_KEY_POST_LIKE = "POST_LIKE_234893204832"
+
+export const usePostLikeMutation = () => {
+ const queryClient = useQueryClient()
+
+ const postLikeMutation = useMutation({
+ mutationKey: [QUERY_KEY_POST_LIKE],
+ mutationFn: (data: postLikePayload) => postLike(data),
+ onSuccess: () => {
+ queryClient.invalidateQueries({
+ queryKey: [QUERY_KEY_GET_PROJECT_DETAIL],
+ })
+ },
+ })
+
+ return { postLikeMutation }
+}
diff --git a/src/types/domain/apiDomain.d.ts b/src/types/domain/apiDomain.d.ts
index 4d27ddc3..efcc0c77 100644
--- a/src/types/domain/apiDomain.d.ts
+++ b/src/types/domain/apiDomain.d.ts
@@ -263,7 +263,6 @@ declare module "api-models" {
}
/* 좋아요 */
- //FIXME: 미완성 api
export type postLikePayload = {
projectId: number
}
From 162ef053bcbb4c54ac707b049ac526130e4cc3d3 Mon Sep 17 00:00:00 2001
From: Whoknow77
Date: Thu, 14 Mar 2024 16:23:54 +0900
Subject: [PATCH 53/58] =?UTF-8?q?[Feat=20=E2=9C=8F=EF=B8=8F]=20=EC=A2=8B?=
=?UTF-8?q?=EC=95=84=EC=9A=94=20=EC=B7=A8=EC=86=8C=20=EC=9A=94=EC=B2=AD=20?=
=?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/like/deleteLike.ts | 12 ++++++++--
.../Summary/SummaryTop/SummaryTopIcon.tsx | 8 +++++--
.../hooks/mutations/useDeleteLikeMutation.ts | 23 +++++++++++++++++++
src/types/domain/apiDomain.d.ts | 11 +++++++--
4 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/src/api/like/deleteLike.ts b/src/api/like/deleteLike.ts
index b85aaf3b..42fcf88d 100644
--- a/src/api/like/deleteLike.ts
+++ b/src/api/like/deleteLike.ts
@@ -1,7 +1,15 @@
import { authInstance } from "@api/axiosInstance"
+import { deleteLikePayload } from "api-models"
+import { AxiosRequestConfig } from "axios"
import { ENDPOINTS } from "@constants/endPoints"
-export const deleteLike = async () => {
- await authInstance.post(ENDPOINTS.UPLOAD_LIKE)
+export const deleteLike = async (
+ { likeId }: deleteLikePayload,
+ config: AxiosRequestConfig = {},
+) => {
+ await authInstance.delete(ENDPOINTS.DELETE_LIKE(likeId)),
+ {
+ ...config,
+ }
}
diff --git a/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTopIcon.tsx b/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTopIcon.tsx
index 9f849038..3edcac84 100644
--- a/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTopIcon.tsx
+++ b/src/pages/ProjectDetailPage/components/Summary/SummaryTop/SummaryTopIcon.tsx
@@ -6,7 +6,9 @@ import {
useMediaQuery,
} from "@chakra-ui/react"
-import { usePostLikeMutation } from "../../../hooks/mutations/usePostLikeMutation"
+import { useDeleteLikeMutation } from "@pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation"
+import { usePostLikeMutation } from "@pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation"
+
import { ProjectIdProps, withProjectId } from "../../Hoc/withProjectId"
interface SummaryTopIconProps extends IconButtonProps, ProjectIdProps {
@@ -19,10 +21,11 @@ const SummaryTopIcon = ({
...props
}: SummaryTopIconProps) => {
const { postLikeMutation } = usePostLikeMutation()
+ const { deleteLikeMutation } = useDeleteLikeMutation()
+
const [isLargerThan1200] = useMediaQuery(["(min-width: 1200px)"])
const isButton = props["aria-label"].toLowerCase().includes("button")
const isLike = props["aria-label"].toLowerCase().includes("like")
- console.log(isLike)
return (
{
postLikeMutation.mutate({ projectId: Number(projectId) })
+ deleteLikeMutation.mutate({ likeId: 12 })
}}
{...props}
/>
diff --git a/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts b/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
index e69de29b..100e7da8 100644
--- a/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
+++ b/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
@@ -0,0 +1,23 @@
+import { deleteLike } from "@api/like/deleteLike"
+import { deleteLikePayload } from "api-models"
+
+import { useMutation, useQueryClient } from "@tanstack/react-query"
+
+import { QUERY_KEY_GET_PROJECT_DETAIL } from "../queries/useProjectDetailQuery"
+
+const QUERY_KEY_POST_LIKE = "DELETE_LIKE_1328940382182"
+
+export const useDeleteLikeMutation = () => {
+ const queryClient = useQueryClient()
+
+ const deleteLikeMutation = useMutation({
+ mutationKey: [QUERY_KEY_POST_LIKE],
+ mutationFn: (data: deleteLikePayload) => deleteLike(data),
+ onSuccess: () => {
+ queryClient.invalidateQueries({
+ queryKey: [QUERY_KEY_GET_PROJECT_DETAIL],
+ })
+ },
+ })
+ return { deleteLikeMutation }
+}
diff --git a/src/types/domain/apiDomain.d.ts b/src/types/domain/apiDomain.d.ts
index efcc0c77..27187753 100644
--- a/src/types/domain/apiDomain.d.ts
+++ b/src/types/domain/apiDomain.d.ts
@@ -134,10 +134,9 @@ declare module "api-models" {
export type Like = {
id: number
- userId: string
projectId: string
+ userId: string
createdAt: string
- updatedAt: string
}
export type TechStack = {
@@ -263,10 +262,18 @@ declare module "api-models" {
}
/* 좋아요 */
+ export type getLikePayload = {
+ likes: Like[]
+ }
+
export type postLikePayload = {
projectId: number
}
+ export type deleteLikePayload = {
+ likeId: number
+ }
+
/* 댓글 */
export type postCommentPayload = {
From 6e0a09c7cb44709b5d232759e01408dbcfad70b2 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 17:50:41 +0900
Subject: [PATCH 54/58] =?UTF-8?q?[Fix=20=F0=9F=AA=9B]=20=EB=8B=A4=EB=A5=B8?=
=?UTF-8?q?=20=EC=9A=94=EC=B2=AD=EC=97=90=EC=84=9C=20401=EC=97=90=EB=9F=AC?=
=?UTF-8?q?=EB=A5=BC=20=EB=B0=9B=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EA=B6=8C?=
=?UTF-8?q?=ED=95=9C=20=EC=97=90=EB=9F=AC=EB=A5=BC=20=EC=83=9D=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/axiosInstance.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/api/axiosInstance.ts b/src/api/axiosInstance.ts
index c48a7545..8c9f4ef9 100644
--- a/src/api/axiosInstance.ts
+++ b/src/api/axiosInstance.ts
@@ -40,7 +40,7 @@ authInstance.interceptors.request.use(
return Promise.reject(new LogoutError())
}
- throw refreshError
+ return Promise.reject(refreshError)
}
}
@@ -64,7 +64,7 @@ authInstance.interceptors.response.use(
if (originalRequest && !originalRequest?._retry) {
originalRequest._retry = true
} else {
- return Promise.reject(new LogoutError())
+ return Promise.reject(new PermissionError())
}
const refreshToken = authToken.getRefreshToken()
From a5d48280b56c17d1295e0953cd9ec8cbc748421c Mon Sep 17 00:00:00 2001
From: Whoknow77
Date: Thu, 14 Mar 2024 19:44:04 +0900
Subject: [PATCH 55/58] =?UTF-8?q?[Fix=20=F0=9F=AA=9B]=20=ED=83=80=EC=9E=85?=
=?UTF-8?q?=EC=98=A4=EB=A5=98=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/comment/postComment.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/comment/postComment.ts b/src/api/comment/postComment.ts
index d2f09804..030e59b6 100644
--- a/src/api/comment/postComment.ts
+++ b/src/api/comment/postComment.ts
@@ -9,7 +9,7 @@ export const postComment = async (
{ ...data }: postCommentPayload,
config: AxiosRequestConfig = {},
) => {
- await authInstance.post(ENDPOINTS.POST_COMMENT(), data, {
+ await authInstance.post(ENDPOINTS.POST_COMMENT, data, {
...config,
})
}
From a4451a3470f8e5251844cd4916f97f5d7d1bfbaf Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Thu, 14 Mar 2024 23:37:41 +0900
Subject: [PATCH 56/58] =?UTF-8?q?[Refactoring=20=E2=9A=99=EF=B8=8F]=20?=
=?UTF-8?q?=ED=9B=88=EC=98=A4=EB=8B=98=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?=
=?UTF-8?q?=EC=98=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../InputController/types/InputControllerProps.ts | 2 +-
.../SignUpPage/components/SignUpForm/SignUpForm.tsx | 10 ++--------
.../SignUpForm/components/DoubleCheckButton.tsx | 3 +--
.../hooks/mutations/useDoubleCheckEmailMutation.ts | 7 +------
.../hooks/mutations/useDoubleCheckNicknameMutation.ts | 7 +------
src/pages/SignUpPage/hooks/useSignUpForm.ts | 5 +----
src/pages/SignUpPage/types/DoubleCheckProps.ts | 1 -
src/pages/SignUpPage/types/SignUpFormValues.ts | 2 +-
8 files changed, 8 insertions(+), 29 deletions(-)
diff --git a/src/components/InputController/types/InputControllerProps.ts b/src/components/InputController/types/InputControllerProps.ts
index 1c8cfc51..b8543d98 100644
--- a/src/components/InputController/types/InputControllerProps.ts
+++ b/src/components/InputController/types/InputControllerProps.ts
@@ -3,7 +3,7 @@ import { FieldValues, RegisterOptions } from "react-hook-form"
import { InputProps } from "@chakra-ui/input"
-import { FieldNames } from "./FieldNames"
+import { FieldNames } from "./fieldNames"
export interface InputControllerProps {
fieldName: FieldNames
diff --git a/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx b/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx
index 0417a632..65fde37a 100644
--- a/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx
+++ b/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx
@@ -42,10 +42,7 @@ const SignUpForm = () => {
registerOptions={emailOptions}>
{(renderProps) => (
-
+
{
registerOptions={nicknameOptions}>
{(renderProps) => (
-
+
{
+const useDoubleCheckEmailMutaion = ({ setError }: DoubleCheckProps) => {
return useMutation({
mutationFn: (email: string) => postDoubleCheckEmail({ email }),
onSuccess: (response) => {
if (response.isDuplicated) {
setError()
- } else {
- trigger()
}
},
})
diff --git a/src/pages/SignUpPage/hooks/mutations/useDoubleCheckNicknameMutation.ts b/src/pages/SignUpPage/hooks/mutations/useDoubleCheckNicknameMutation.ts
index 10860c67..75a10879 100644
--- a/src/pages/SignUpPage/hooks/mutations/useDoubleCheckNicknameMutation.ts
+++ b/src/pages/SignUpPage/hooks/mutations/useDoubleCheckNicknameMutation.ts
@@ -4,17 +4,12 @@ import { postDoubleCheckNickname } from "@apis/user/postDoubleCheckNickname"
import { DoubleCheckProps } from "@pages/SignUpPage/types/DoubleCheckProps"
-const useDoubleCheckNicknameMutation = ({
- setError,
- trigger,
-}: DoubleCheckProps) => {
+const useDoubleCheckNicknameMutation = ({ setError }: DoubleCheckProps) => {
return useMutation({
mutationFn: (nickname: string) => postDoubleCheckNickname({ nickname }),
onSuccess: (response) => {
if (response.isDuplicated) {
setError()
- } else {
- trigger()
}
},
})
diff --git a/src/pages/SignUpPage/hooks/useSignUpForm.ts b/src/pages/SignUpPage/hooks/useSignUpForm.ts
index 03fda7db..1efabec0 100644
--- a/src/pages/SignUpPage/hooks/useSignUpForm.ts
+++ b/src/pages/SignUpPage/hooks/useSignUpForm.ts
@@ -27,7 +27,6 @@ export const useSignUpForm = () => {
setCheckedEmail(() => "")
method.setError("email", duplicatedErrors.email)
},
- trigger: () => method.trigger("email"),
})
const nicknameCheck = useDoubleCheckNicknameMutation({
@@ -35,7 +34,6 @@ export const useSignUpForm = () => {
setCheckedNickname(() => "")
method.setError("nickname", duplicatedErrors.nickname)
},
- trigger: () => method.trigger("nickname"),
})
const signUp = useSignUpMutation()
@@ -108,8 +106,7 @@ export const useSignUpForm = () => {
title: message,
})
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [signUp.error])
+ }, [signUp.error, toast])
return {
method,
diff --git a/src/pages/SignUpPage/types/DoubleCheckProps.ts b/src/pages/SignUpPage/types/DoubleCheckProps.ts
index 6f8391e8..afc44c1d 100644
--- a/src/pages/SignUpPage/types/DoubleCheckProps.ts
+++ b/src/pages/SignUpPage/types/DoubleCheckProps.ts
@@ -1,4 +1,3 @@
export interface DoubleCheckProps {
setError: () => void
- trigger: () => void
}
diff --git a/src/pages/SignUpPage/types/SignUpFormValues.ts b/src/pages/SignUpPage/types/SignUpFormValues.ts
index aaaef996..8ddbc9e4 100644
--- a/src/pages/SignUpPage/types/SignUpFormValues.ts
+++ b/src/pages/SignUpPage/types/SignUpFormValues.ts
@@ -1,3 +1,3 @@
-import { FieldNames } from "@components/InputController/types/FieldNames"
+import { FieldNames } from "@components/InputController/types/fieldNames"
export interface SignUpFormValues extends Record {}
From cd2f33b8dc897d741c3ff975f4e37edab27b26b4 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Fri, 15 Mar 2024 09:36:03 +0900
Subject: [PATCH 57/58] =?UTF-8?q?[Rename=20=F0=9F=8F=B7=EF=B8=8F]=20?=
=?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=8B=A4=ED=8C=A8=ED=96=88=EB=8D=98=20?=
=?UTF-8?q?=EA=B2=BD=EB=A1=9C=EB=AA=85=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/like/deleteLike.ts | 3 ++-
.../ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts | 3 ++-
.../ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/api/like/deleteLike.ts b/src/api/like/deleteLike.ts
index 42fcf88d..e88f0e84 100644
--- a/src/api/like/deleteLike.ts
+++ b/src/api/like/deleteLike.ts
@@ -1,7 +1,8 @@
-import { authInstance } from "@api/axiosInstance"
import { deleteLikePayload } from "api-models"
import { AxiosRequestConfig } from "axios"
+import { authInstance } from "@apis/axiosInstance"
+
import { ENDPOINTS } from "@constants/endPoints"
export const deleteLike = async (
diff --git a/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts b/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
index 100e7da8..981065b0 100644
--- a/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
+++ b/src/pages/ProjectDetailPage/hooks/mutations/useDeleteLikeMutation.ts
@@ -1,8 +1,9 @@
-import { deleteLike } from "@api/like/deleteLike"
import { deleteLikePayload } from "api-models"
import { useMutation, useQueryClient } from "@tanstack/react-query"
+import { deleteLike } from "@apis/like/deleteLike"
+
import { QUERY_KEY_GET_PROJECT_DETAIL } from "../queries/useProjectDetailQuery"
const QUERY_KEY_POST_LIKE = "DELETE_LIKE_1328940382182"
diff --git a/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts b/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
index 71c4cf1b..cb59ed53 100644
--- a/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
+++ b/src/pages/ProjectDetailPage/hooks/mutations/usePostLikeMutation.ts
@@ -1,8 +1,9 @@
-import { postLike } from "@api/like/postLike"
import { postLikePayload } from "api-models"
import { useMutation, useQueryClient } from "@tanstack/react-query"
+import { postLike } from "@apis/like/postLike"
+
import { QUERY_KEY_GET_PROJECT_DETAIL } from "../queries/useProjectDetailQuery"
const QUERY_KEY_POST_LIKE = "POST_LIKE_234893204832"
From c57cbaf05bf84ba5ea2a27a4f2ce81dcb716c338 Mon Sep 17 00:00:00 2001
From: genTe <128919388+wdgWon@users.noreply.github.com>
Date: Fri, 15 Mar 2024 09:50:17 +0900
Subject: [PATCH 58/58] =?UTF-8?q?[Rename]=20FieldNames.ts=20=EC=9D=84=20fi?=
=?UTF-8?q?eldNames.ts=20=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../InputController/types/{FieldNames.ts => fieldNames.ts} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/components/InputController/types/{FieldNames.ts => fieldNames.ts} (100%)
diff --git a/src/components/InputController/types/FieldNames.ts b/src/components/InputController/types/fieldNames.ts
similarity index 100%
rename from src/components/InputController/types/FieldNames.ts
rename to src/components/InputController/types/fieldNames.ts