From 39649307822dca9ddb6ae568905e396068ca7e03 Mon Sep 17 00:00:00 2001 From: Haneul-Kim <4188989@naver.com> Date: Fri, 23 Feb 2024 19:58:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A9=B9=20fix:=20240223=20QA=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/[eventId]/_components/tab/DescriptionTab.tsx | 2 +- app/_api/api.ts | 4 ++-- app/_components/GenericFormProvider.tsx | 2 +- app/_components/header/PcHeader.tsx | 2 +- app/_components/input/InputText.tsx | 8 +++++--- app/_components/modal/WithdrawModal.tsx | 2 +- app/_store/session/cookies.ts | 4 +++- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/(route)/event/[eventId]/_components/tab/DescriptionTab.tsx b/app/(route)/event/[eventId]/_components/tab/DescriptionTab.tsx index c0384f7f..259d5956 100644 --- a/app/(route)/event/[eventId]/_components/tab/DescriptionTab.tsx +++ b/app/(route)/event/[eventId]/_components/tab/DescriptionTab.tsx @@ -12,7 +12,7 @@ const DescriptionTab = ({ images, description }: Props) => { return (

{description}

- {images?.map((image) => {"행사)} + {images?.map((image) => {"행사)}
); }; diff --git a/app/_api/api.ts b/app/_api/api.ts index 18be58e6..b64a7212 100644 --- a/app/_api/api.ts +++ b/app/_api/api.ts @@ -125,7 +125,7 @@ export class Api { return res; } - async delete(endPoint: T, body: DeleteBodyType) { + async delete(endPoint: T, body?: DeleteBodyType) { this.baseUrl = "/api" + endPoint; const newEndPoint = this.baseUrl; @@ -136,7 +136,7 @@ export class Api { "Content-type": "application/json", }, }; - const res = await fetch(newEndPoint); + const res = await fetch(newEndPoint, config); if (await this.updateToken(res)) { const refetchResult = await this.refetch(newEndPoint, config); return refetchResult; diff --git a/app/_components/GenericFormProvider.tsx b/app/_components/GenericFormProvider.tsx index d84b5127..c91e7338 100644 --- a/app/_components/GenericFormProvider.tsx +++ b/app/_components/GenericFormProvider.tsx @@ -71,7 +71,7 @@ const GenericFormProvider = ({ children, formOptions }: G if (path === "/signup") { const res = await handleSignupSubmit(userInputValue, instance); if (!res.error) { - router.push("/"); + router.refresh(); } } }; diff --git a/app/_components/header/PcHeader.tsx b/app/_components/header/PcHeader.tsx index 711903df..25cd824a 100644 --- a/app/_components/header/PcHeader.tsx +++ b/app/_components/header/PcHeader.tsx @@ -30,7 +30,7 @@ const PcHeader = () => { return; } setSession(undefined); - }, [newSession?.isAuth]); + }, [newSession?.user.profileImage]); return (
diff --git a/app/_components/input/InputText.tsx b/app/_components/input/InputText.tsx index d6f074e9..638770e1 100644 --- a/app/_components/input/InputText.tsx +++ b/app/_components/input/InputText.tsx @@ -7,7 +7,7 @@ import ClearIcon from "@/public/icon/x_gray.svg"; interface Prop extends InputHTMLAttributes { children?: ReactNode; - type?: "text" | "password"; + type?: "text" | "password" | "email"; horizontal?: boolean; hint?: string; onKeyDown?: (e: KeyboardEvent) => void; @@ -117,8 +117,10 @@ const InputText: Function = ({ onKeyDown={onKeyDown} {...field} className={classNames( - "focus:border-1 mt-8 h-48 w-full rounded-sm bg-gray-50 px-16 py-12 pr-36 text-16 text-gray-900 placeholder:text-gray-400 focus:outline focus:outline-1 focus:outline-blue", - { "outline outline-1 outline-red": fieldState.error }, + "mt-8 h-48 w-full rounded-sm bg-gray-50 px-16 py-12 pr-36 text-16 text-gray-900 outline-none placeholder:text-gray-400 focus:border focus:border-blue", + { + "border border-red": fieldState.error, + }, )} />