From dd46a059c539bdf9179a02d004ddd6cd478663bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 21 Aug 2025 16:53:36 +0200 Subject: [PATCH] aah, i forgot to add the latest commit --- client/homebrew/navbar/newbrew.navitem.jsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index c20ae6b6c..ccade4e8b 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -34,16 +34,11 @@ const NewBrew = ()=>{ } const type = file.name.split('.').pop().toLowerCase(); - if(type === 'txt') { - alert( - `This file type is correct, but it is not from the homebrewery or has been tampered with, please try with a correct file or report this as an issue if you think it is a mistake.` - ); - } else if(!type) { - alert('This file is invalid, please, enter a valid file'); - console.log(file); - } else { - alert(`This is a .${type} file, only .txt files are allowed`); - } + + alert(`This file is invalid: ${!type ? "Missing file extension" :`.${type} files are not supported`}. Only .txt files exported from the Homebrewery are allowed.`); + + + console.log(file); }; reader.readAsText(file); };