Skip to content

Commit

Permalink
changes input and error message to a more friendly message (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Mateus Vieira <[email protected]>
  • Loading branch information
GabrielCastelo-31 and mateusvrs authored Aug 14, 2024
1 parent b46e054 commit b3e8235
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions web/app/components/AsideSchedulePopUp/Form/InputForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ function Form(props: FormPropsType) {
<form className='flex items-center w-11/12 px-2 bg-white shadow-md rounded-xl' onSubmit={handleSearch}>
<input
type="text"
placeholder='Nome da matéria...'
placeholder='Matéria ou Professor...'
value={formData.search}
onChange={(e) => setFormData({ ...formData, search: e.target.value })}
ref={inputRef}
className='h-14 p-2 w-full rounded-xl focus:outline-none'
/>
<button type='submit' >
<Image
<Image
width={30} height={30}
src={searchIcon} alt='ícone de pesquisa'
/>
Expand Down Expand Up @@ -71,4 +71,4 @@ export default function InputForm(props: InputFormPropsType) {
}

return <Form form={props.form} handleSearch={handleSearch} inputRef={inputRef} />;
}
}
4 changes: 2 additions & 2 deletions web/app/utils/api/searchDiscipline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async function searchDiscipline(search: string, year: string, per

const data: Array<DisciplineType> = response.data;
if (data.length === 0) {
toast.error('Matéria invalida');
toast.error('Nenhuma disciplina encontrada');
}
return data;
} catch (error: any) {
Expand All @@ -45,4 +45,4 @@ export default async function searchDiscipline(search: string, year: string, per
toast.error('A busca deve conter pelo menos 4 caracteres');
}
}
}
}

0 comments on commit b3e8235

Please sign in to comment.