N-FIN-12: refresh page after generation

This commit is contained in:
Markus Thielker 2024-03-11 03:52:44 +01:00
parent b8a7a5d6f4
commit 382df84510
No known key found for this signature in database

View file

@ -14,9 +14,7 @@ export default function GenerateSampleDataForm({onSubmit}: { onSubmit: () => Pro
const handleSubmit = async () => {
const response = await onSubmit();
toast(sonnerContent(response));
if (response.redirect) {
router.push(response.redirect);
}
router.refresh();
};
return (