diff --git a/src/pages/shareplan/[hash].tsx b/src/pages/shareplan/[hash].tsx index e3829b8..c3202d1 100644 --- a/src/pages/shareplan/[hash].tsx +++ b/src/pages/shareplan/[hash].tsx @@ -56,14 +56,16 @@ const SharePlan = ({ numberOfPlans: plans.length, }); - void router.push(`/plans`).then(() => { - setPlans([...plans, newPlan]); - setPlanToCopy({ - ...planToCopy, - courses: plan.courses, - groups: plan.groups, - }); + setPlans([...plans, newPlan]); + setPlanToCopy({ + ...planToCopy, + courses: plan.courses, + groups: plan.groups, }); + + setTimeout(() => { + void router.push(`/createplan/${newPlan.id}`); + }, 200); }; return (