Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fe/src/app/eventcreate-page/components/EventNameInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
cleanString,
isValidLength,
generateDefaultEventName,
} from "../utils/formHelpers";
} from "../utils/formHelpers";

interface EventNameInputProps {
className?: string;
Expand Down
3 changes: 1 addition & 2 deletions fe/src/app/eventcreate-page/location-search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ function LocationSearch() {
};
}, [location, debouncedFetch]);

// Focus the input field on component mount
useEffect(() => {
if (inputRef.current) {
inputRef.current.focus(); // Automatically focus on the input field
inputRef.current.focus();
}
}, []);

Expand Down
18 changes: 8 additions & 10 deletions fe/src/app/eventcreate-page/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ function EventCreatePage() {
setIsSubmitting(false);
}
};
useEffect(() => {
setLocation(null); // selectedLocation 초기화
setEventName(""); // eventName 초기화
}, [setLocation]);

useEffect(() => {
if (uuid) router.push(`/event-maps/${uuid}`);
Expand All @@ -64,12 +60,14 @@ function EventCreatePage() {
className="mt-[12px] w-full"
value={selectedLocation?.name || ""}
/>
<EventNameInput
className="mt-[40px] w-full"
value={eventName}
selectedLocation={selectedLocation?.name || ""}
onChange={setEventName}
/>
<div className="relative mt-[40px] w-full">
<EventNameInput
className="w-full"
value={eventName}
selectedLocation={selectedLocation?.name || ""}
onChange={setEventName}
/>
</div>
</div>
<div className="w-full fixed bottom-[45px] left-0 flex justify-center">
<Button
Expand Down