Date: Mon, 18 Nov 2024 08:54:27 +0900
Subject: [PATCH 13/17] =?UTF-8?q?Refactor:=20props=20=EC=B6=94=EA=B0=80=20?=
=?UTF-8?q?#101?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/Form/FormWrapper.tsx | 40 +++++++++++---------
frontend/src/components/Place/CheckIcon.tsx | 18 +++++++--
frontend/src/components/common/PrevIcon.tsx | 8 ++--
3 files changed, 43 insertions(+), 23 deletions(-)
diff --git a/frontend/src/components/Form/FormWrapper.tsx b/frontend/src/components/Form/FormWrapper.tsx
index c2809580..78d98813 100644
--- a/frontend/src/components/Form/FormWrapper.tsx
+++ b/frontend/src/components/Form/FormWrapper.tsx
@@ -11,6 +11,7 @@ type FormWrapperProps = {
updateMapInfo:
(field: K, value: BaseMap[K]) => void;
isMapInfoValid: boolean;
onSubmitHandler: (e: React.FormEvent) => void;
+ isEditMode?: boolean;
};
const FormWrapper = ({
@@ -19,6 +20,7 @@ const FormWrapper = ({
updateMapInfo,
isMapInfoValid,
onSubmitHandler,
+ isEditMode = false,
}: FormWrapperProps) => {
const { title, description, isPublic, mode, thumbnailUrl } = mapInfo;
@@ -27,16 +29,18 @@ const FormWrapper = ({
-
+ {!isEditMode && (
+
+ )}
-
+
+
+
);
diff --git a/frontend/src/components/Place/CheckIcon.tsx b/frontend/src/components/Place/CheckIcon.tsx
index b88d3771..f4d95aa9 100644
--- a/frontend/src/components/Place/CheckIcon.tsx
+++ b/frontend/src/components/Place/CheckIcon.tsx
@@ -1,11 +1,23 @@
-const CheckIcon = () => {
+type CheckIconProps = {
+ width?: number;
+ height?: number;
+ className?: string;
+};
+
+const CheckIcon = ({
+ width = 24,
+ height = 24,
+ className = '',
+}: CheckIconProps) => {
return (