+
{userName}๋์ ๋งตํ ๋ชจ์์ด์์
)}
diff --git a/fe/src/app/eventcreate-page/components/EventNameInput.tsx b/fe/src/app/eventcreate-page/components/EventNameInput.tsx
index 8d90214..5e9f979 100644
--- a/fe/src/app/eventcreate-page/components/EventNameInput.tsx
+++ b/fe/src/app/eventcreate-page/components/EventNameInput.tsx
@@ -24,14 +24,15 @@ export default function EventNameInput({
}: EventNameInputProps) {
const [hasUserEdited, setHasUserEdited] = useState(false);
const [isTyping, setIsTyping] = useState(false);
- const showWarning = hasUserEdited && !isValidLength(cleanString(value), 1);
useEffect(() => {
- if (!hasUserEdited) {
+ if (!hasUserEdited && !value) {
const newEventName: string = generateDefaultEventName(selectedLocation);
- onChange(newEventName);
+ if (newEventName) {
+ onChange(newEventName);
+ }
}
- }, [selectedLocation, onChange, hasUserEdited]);
+ }, [selectedLocation, onChange, hasUserEdited, value]);
const handleInputChange = useCallback(
(e: React.ChangeEvent
) => {
@@ -51,6 +52,8 @@ export default function EventNameInput({
onChange("");
}, [onChange]);
+ const showWarning = hasUserEdited && !isValidLength(cleanString(value), 1);
+
return (