feat: nieuwe sprint wordt direct geselecteerd zonder redirect

createSprintAction zet nu de active-sprint cookie naar de zojuist
aangemaakte sprint, en de StartSprintButton refresht de huidige
pagina i.p.v. te redirecten naar /sprint. Resultaat: gebruiker blijft
op de product backlog en ziet de nieuwe sprint direct geselecteerd
in de sprint-pulldown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-08 02:02:24 +02:00
parent d90d8a8aa2
commit 486736f267
3 changed files with 3 additions and 2 deletions

View file

@ -72,6 +72,7 @@ export async function createSprintAction(_prevState: unknown, formData: FormData
}),
)
await setActiveSprintCookie(parsed.data.productId, sprint.id)
revalidatePath(`/products/${parsed.data.productId}`)
return { success: true, sprintId: sprint.id }
}