Skip to content

Commit

Permalink
fix(picture input): improve error message
Browse files Browse the repository at this point in the history
Co-Authored-By: Rita Lopes <[email protected]>
  • Loading branch information
tomas-sucena and MRita443 committed Jan 24, 2025
1 parent 74a4d1a commit 7bba9e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/forms/picture-input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ensure the file is an image
if (file?.type?.split('/')[0] !== 'image') {
createNotification(notificationMessages.INVALID_IMAGE);
createNotification(notificationMessages.NOT_AN_IMAGE);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export default Object.freeze<{
[key: string]: string;
}>({
COPY_EMAIL: 'O email foi copiado para o teu clipboard :)',
INVALID_IMAGE: 'Imagem inválida! Por favor, seleciona outra.'
NOT_AN_IMAGE: 'O ficheiro não é uma imagem. Por favor, seleciona outro.'

Check warning on line 5 in src/routes/(app)/_components/layout/notifications/notification-messages.ts

View check run for this annotation

Codecov / codecov/patch

src/routes/(app)/_components/layout/notifications/notification-messages.ts#L4-L5

Added lines #L4 - L5 were not covered by tests
});

0 comments on commit 7bba9e6

Please sign in to comment.