diff --git a/webclient/src/Classes.js b/webclient/src/Classes.js index 30a676c..96ae0bc 100644 --- a/webclient/src/Classes.js +++ b/webclient/src/Classes.js @@ -426,7 +426,7 @@ export function ICalButtons(props) { const { token, clazz } = props; const [loading, setLoading] = useState(false); const [success, setSuccess] = useState(false); - const [setError] = useState(false); + const [error, setError] = useState(false); const handleDownload = (e) => { e.preventDefault(); @@ -505,6 +505,7 @@ export function ICalButtons(props) { /> } + {error &&

Error.

} ); }; diff --git a/webclient/src/Paste.js b/webclient/src/Paste.js index 280c388..1fffb9c 100644 --- a/webclient/src/Paste.js +++ b/webclient/src/Paste.js @@ -56,7 +56,6 @@ function LabelForm(props) { const [input, setInput] = useState({ id: '107', size: '2' }); const [label, setLabel] = useState(false); const [loading, setLoading] = useState(false); - const [setSuccess] = useState(false); const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value }); const handleChange = (e) => handleValues(e, e.currentTarget); @@ -74,7 +73,6 @@ function LabelForm(props) { }) .then(res => { setLoading(false); - setSuccess(true); setError(false); const imageObjectURL = URL.createObjectURL(res); setLabel(imageObjectURL);