From 2964a80d1b77a763512b663db3f62babd9eeab1c Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 15 Oct 2023 14:14:29 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=EC=B0=A8=EB=8B=A8=20=EB=B0=8F=20?= =?UTF-8?q?=ED=8C=94=EB=A1=9C=EC=9E=89=20state=20=EA=B4=80=EB=A6=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-edit/mypage/components/InfoList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages-edit/mypage/components/InfoList.tsx b/src/pages-edit/mypage/components/InfoList.tsx index 2d3b4c7..05b2999 100644 --- a/src/pages-edit/mypage/components/InfoList.tsx +++ b/src/pages-edit/mypage/components/InfoList.tsx @@ -57,6 +57,7 @@ export default function InfoList({ onClick={() => { if (user.isBlocking) { unblock.mutate(user.id); + setFollow(false); } else { if (follow) { delFriendMutation.mutate(); @@ -66,7 +67,7 @@ export default function InfoList({ setFollow((follow) => !follow); } }} - state={follow ? "disabled" : "active"} + state={follow && !user.isBlocking ? "disabled" : "active"} /> )} From 138459b1d47d668bfffa2c72f4d694aa5da24aa9 Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 15 Oct 2023 14:45:39 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/account/useAuth.ts | 4 ++-- src/middleware.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hooks/account/useAuth.ts b/src/hooks/account/useAuth.ts index f3e89a5..2b61e39 100644 --- a/src/hooks/account/useAuth.ts +++ b/src/hooks/account/useAuth.ts @@ -22,7 +22,7 @@ export const useAuth = () => { return Promise.reject(error); } ); - router.push("/auth/default"); + router.push("/"); }, onError: (error: any) => { alert(error); @@ -45,7 +45,7 @@ export const useAuth = () => { return Promise.reject(error); } ); - router.push("/auth/default"); + router.push("/"); }, onError: (error: any) => { alert(error); diff --git a/src/middleware.ts b/src/middleware.ts index ad01756..74f23a4 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -11,10 +11,10 @@ export async function middleware(request: NextRequest) { const requestHeaders = new Headers(request.headers); requestHeaders.set("Authorization", `Bearer ${token}`); - if (pathname.match("/((?!account|auth).*)")) { - return await checkSignIn(request); - } else if (pathname.match("/((?!account).*)")) { + if (pathname.match("/((?!account).*)")) { return await checkSignUp(request); + } else if (pathname.match("/((?!account|auth).*)")) { + return await checkSignIn(request); } return NextResponse.next(); From 5cd8d3b45c1698c91b3fb4c4d9321fa8a45703d6 Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 15 Oct 2023 14:47:57 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20navigation=20top=20back=20import=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages-edit/sign-up/complete.tsx | 7 ++----- src/pages-edit/sign-up/organization.tsx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages-edit/sign-up/complete.tsx b/src/pages-edit/sign-up/complete.tsx index 70a7468..b333454 100644 --- a/src/pages-edit/sign-up/complete.tsx +++ b/src/pages-edit/sign-up/complete.tsx @@ -2,7 +2,7 @@ import styled from "styled-components"; import { useRouter } from "next/navigation"; import ButtonFillLarge from "src/components/buttons/button-fill-large"; -import NavigationTop from "src/components/navigations/NavigationTopBack"; +import NavigationTopBack from "src/components/navigations/NavigationTopBack"; import Text from "src/components/common/Text"; import Flex from "src/components/common/Flex"; @@ -18,10 +18,7 @@ const Complete = () => { ) : ( - } - title="회원 가입" - /> + Date: Sun, 15 Oct 2023 15:44:47 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20QSet=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B0=90=EB=A7=89=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/questions/useQsetMutation.ts | 6 +- .../home/components/MakeOfficial.tsx | 87 ++++++++++--------- .../sign-up/components/university.tsx | 7 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/hooks/questions/useQsetMutation.ts b/src/hooks/questions/useQsetMutation.ts index d55b3af..3074bd6 100644 --- a/src/hooks/questions/useQsetMutation.ts +++ b/src/hooks/questions/useQsetMutation.ts @@ -11,11 +11,7 @@ const useQsetMutation = () => { onSuccess: () => { queryClient.invalidateQueries(QSetCursorKeys.all); }, - onError: (error: any) => { - if (error === "AxiosError: Request failed with status code 404") { - return 0; - } - } + onError: (error: any) => {} }); }; diff --git a/src/pages-edit/home/components/MakeOfficial.tsx b/src/pages-edit/home/components/MakeOfficial.tsx index 6e4ee3f..91a5c28 100644 --- a/src/pages-edit/home/components/MakeOfficial.tsx +++ b/src/pages-edit/home/components/MakeOfficial.tsx @@ -27,53 +27,54 @@ const MakeOfficial = (props: QuestionProps) => { const QSet = useQsetCursorQuery(); const newQSet = useQsetMutation(); - console.log(QSet); - const [endTime, setEndTime] = useState(NaN); const [time, setTime] = useState