diff --git a/fe/src/app/eventcreate-page/components/EventNameInput.tsx b/fe/src/app/eventcreate-page/components/EventNameInput.tsx index 26701f4..26bf9d3 100644 --- a/fe/src/app/eventcreate-page/components/EventNameInput.tsx +++ b/fe/src/app/eventcreate-page/components/EventNameInput.tsx @@ -2,13 +2,6 @@ import React, { useEffect, useState, useCallback } from "react"; import Image from "next/image"; import { EventNameInputProps } from "@/app/eventcreate-page/types/types"; -const getCurrentDate = () => { - const today = new Date(); - const month = String(today.getMonth() + 1).padStart(2, "0"); - const day = String(today.getDate()).padStart(2, "0"); - return `${month}.${day}`; -}; - function EventNameInput({ className, selectedLocation, @@ -16,17 +9,14 @@ function EventNameInput({ value, }: EventNameInputProps) { const [hasUserEdited, setHasUserEdited] = useState(false); - const currentDate = getCurrentDate(); const showWarning = hasUserEdited && value.trim().length < 1; useEffect(() => { if (!hasUserEdited) { - const newEventName = selectedLocation - ? `${currentDate} ${selectedLocation} 모임` - : ""; + const newEventName = selectedLocation ? `${selectedLocation} 모임` : ""; onChange(newEventName); } - }, [selectedLocation, currentDate, onChange, hasUserEdited]); + }, [selectedLocation, onChange, hasUserEdited]); const handleInputChange = useCallback( (e: React.ChangeEvent) => { @@ -44,7 +34,7 @@ function EventNameInput({ return (
diff --git a/fe/src/app/eventcreate-page/components/LocationInput.tsx b/fe/src/app/eventcreate-page/components/LocationInput.tsx index 9936e01..53f0bb1 100644 --- a/fe/src/app/eventcreate-page/components/LocationInput.tsx +++ b/fe/src/app/eventcreate-page/components/LocationInput.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useState } from "react"; import { useRouter } from "next/navigation"; import Image from "next/image"; import { useLocationStore } from "@/app/eventcreate-page/stores/useLocationStore"; -import { LocationInputProps } from "@/app/eventcreate-page/types/types"; // 'Place'를 삭제 +import { LocationInputProps } from "@/app/eventcreate-page/types/types"; function LocationInput({ className, @@ -25,7 +25,7 @@ function LocationInput({ return (