The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
avoid client error when group slug change
Steven Teye06aa9cc6490
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-settings.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-settings.tsxindex 8c56218469..833e1dca6f 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-settings.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-settings.tsx@@ -56,14 +56,12 @@ function GroupSettingsForm({ group }: { group: GroupProps }) {method: "PATCH",body: data,onSuccess: async () => {- toast.success("Group updated successfully!");-+ await mutatePrefix("/api/groups");// If slug changed, redirect to new URLif (data.slug !== group.slug) {router.push(`/${slug}/program/groups/${data.slug}/settings`);}-- await mutatePrefix("/api/groups");+ toast.success("Group updated successfully!");},});};