From 26f578105dadf177b54b3340113f592952cbf8db Mon Sep 17 00:00:00 2001 From: karnelll <165611407+karnelll@users.noreply.github.com> Date: Wed, 6 Nov 2024 00:19:03 +0900 Subject: [PATCH] Refactor EventCreatePage component --- fe/src/app/components/common/Button.tsx | 4 +--- fe/src/app/eventcreate-page/page.tsx | 14 ++------------ fe/src/app/page.tsx | 2 +- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/fe/src/app/components/common/Button.tsx b/fe/src/app/components/common/Button.tsx index 3429476..0df21b0 100644 --- a/fe/src/app/components/common/Button.tsx +++ b/fe/src/app/components/common/Button.tsx @@ -14,9 +14,7 @@ function Button({ if (!disabled) { buttonStyle = - type === "start" - ? "bg-[#F73A2C] text-white" // 시작하기 버튼 색상 변경 - : "bg-gray-500 text-grayscale-0"; + type === "start" ? "bg-[#F73A2C] text-white" : "bg-[#1D1D1D] text-white"; } return ( diff --git a/fe/src/app/eventcreate-page/page.tsx b/fe/src/app/eventcreate-page/page.tsx index af6b26c..c883335 100644 --- a/fe/src/app/eventcreate-page/page.tsx +++ b/fe/src/app/eventcreate-page/page.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React, { useState, useEffect } from "react"; import { useRouter } from "next/navigation"; import Navigation from "@/app/components/common/Navigation"; import LocationInput from "@/app/eventcreate-page/components/LocationInput"; @@ -15,16 +15,6 @@ function EventCreatePage() { const [isSubmitting, setIsSubmitting] = useState(false); const [uuid, setUuid] = useState(null); - useEffect(() => { - if (selectedLocation) { - const formattedDate = new Date().toLocaleDateString("ko-KR", { - month: "2-digit", - day: "2-digit", - }); - setEventName(`${formattedDate} ${selectedLocation.name} 모임`); - } - }, [selectedLocation]); - const isFormComplete = selectedLocation?.name && eventName.trim(); const handleNextClick = async () => { @@ -80,7 +70,7 @@ function EventCreatePage() {