This commit is contained in:
qiuchenfan 2025-11-17 19:36:05 +08:00
parent 8fcd74b79f
commit d42096efed
1 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,8 @@ export function WeatherSearchForm() {
setCity(e.target.value); setCity(e.target.value);
if (inputError) { if (inputError) {
setInputError(''); setInputError('');
} };
}
const handleFormSubmit = async (e: FormEvent<HTMLFormElement>) => { const handleFormSubmit = async (e: FormEvent<HTMLFormElement>) => {
e.preventDefault(); e.preventDefault();
@ -36,6 +37,7 @@ export function WeatherSearchForm() {
return; return;
} }
await searchWeather(trimmedCity); await searchWeather(trimmedCity);
}
return ( return (
<div className='p-6 border-6 border-b-slate-200/50 '> <div className='p-6 border-6 border-b-slate-200/50 '>
@ -94,5 +96,4 @@ export function WeatherSearchForm() {
) )
} }
}
}