From 5ed2b7f126b80539356d0bc3dbd253bd61db80bc Mon Sep 17 00:00:00 2001 From: effozen Date: Wed, 4 Dec 2024 23:43:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[FE][Fix][Refactor]=20#416=20:=20Confirm=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EC=B0=BD=20UI=20=EC=A4=91=EC=8B=AC=20?= =?UTF-8?q?=EB=A7=9E=EC=B6=A4=20=EB=B0=8F=20=EC=BD=94=EB=93=9C=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/component/confirm/Confirm.tsx | 42 +++++++++---------- frontend/src/lib/constants/commonConstants.ts | 4 +- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/frontend/src/component/confirm/Confirm.tsx b/frontend/src/component/confirm/Confirm.tsx index 47efcdcf..8cddee57 100644 --- a/frontend/src/component/confirm/Confirm.tsx +++ b/frontend/src/component/confirm/Confirm.tsx @@ -1,3 +1,18 @@ +interface IConfirmButtonProps { + onClick: () => void; + text: string; +} + +const ConfirmButton = (props: IConfirmButtonProps) => ( + +); + interface IConfirmProps { message: string; onConfirm: () => void; @@ -9,34 +24,17 @@ interface IConfirmProps { export const Confirm = (props: IConfirmProps) => { return ( -
-
+
+
{props.message}
{props.type === 'alert' ? ( -
- -
+ ) : (
- - + +
)}
diff --git a/frontend/src/lib/constants/commonConstants.ts b/frontend/src/lib/constants/commonConstants.ts index 2670e0ba..d83fd661 100644 --- a/frontend/src/lib/constants/commonConstants.ts +++ b/frontend/src/lib/constants/commonConstants.ts @@ -9,8 +9,8 @@ export const AppConfig = { /** * API SERVER */ - API_SERVER: 'https://ddara.kro.kr/api', - // API_SERVER: 'http://localhost:3001/api', + // API_SERVER: 'https://ddara.kro.kr/api', + API_SERVER: 'http://localhost:3001/api', SOCKET_SERVER: 'wss://ddara.kro.kr/ws', // SOCKET_SERVER: 'ws://localhost:3001', From fdb1874a17c9d49f3f85e1c79499fa241ea6df68 Mon Sep 17 00:00:00 2001 From: effozen Date: Wed, 4 Dec 2024 23:52:12 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[FE][Fix][Refactor]=20#416=20:=20Confirm=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EC=B0=BD=20UI=20=EC=A4=91=EC=8B=AC=20?= =?UTF-8?q?=EB=A7=9E=EC=B6=A4=20=EB=B0=8F=20=EC=BD=94=EB=93=9C=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/component/confirm/Confirm.tsx | 42 +++++++++++----------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/frontend/src/component/confirm/Confirm.tsx b/frontend/src/component/confirm/Confirm.tsx index 47efcdcf..8cddee57 100644 --- a/frontend/src/component/confirm/Confirm.tsx +++ b/frontend/src/component/confirm/Confirm.tsx @@ -1,3 +1,18 @@ +interface IConfirmButtonProps { + onClick: () => void; + text: string; +} + +const ConfirmButton = (props: IConfirmButtonProps) => ( + +); + interface IConfirmProps { message: string; onConfirm: () => void; @@ -9,34 +24,17 @@ interface IConfirmProps { export const Confirm = (props: IConfirmProps) => { return ( -
-
+
+
{props.message}
{props.type === 'alert' ? ( -
- -
+ ) : (
- - + +
)}