feat(*): Display feedback after upload

This commit is contained in:
Josh Creek
2025-04-16 23:16:05 +01:00
parent 6eef08c86b
commit e8f1b9447b
3 changed files with 43 additions and 4 deletions
+4 -1
View File
@@ -47,9 +47,12 @@ async function handleSubmit(event: Event) {
});
const result = await response.json();
if (response.ok && result.success) {
successMsg = result.feedback;
// Redirect to /results with feedback in history state
window.history.pushState({ feedback: result }, '', '/results');
window.location.assign('/results');
file = null;
textInput = '';
return;
} else {
errorMsg = result.error || 'An error occurred.';
}