fix: revalidate /customize (not /settings) after customize-panel mutations

The invites/onboarding/areas/roles/tiers admin panels moved to /customize, but
their actions still revalidated the old /settings route, so the /customize
Router Cache went stale after a write. Point them at /customize (keeping the
other cross-page revalidations).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Moheeb Zara
2026-08-04 19:10:52 -07:00
co-authored by Claude Opus 4.8
parent 2dbd52e2e4
commit 33b2475e67
5 changed files with 18 additions and 18 deletions
+6 -6
View File
@@ -39,7 +39,7 @@ export async function upsertRoleLabel(input: {
}, { onConflict: 'space_id,role' })
if (error) return { error: error.message }
revalidatePath('/settings')
revalidatePath('/customize')
return { success: true as const }
}
@@ -72,7 +72,7 @@ export async function createCustomRole(input: {
.single()
if (error) return { error: error.message }
revalidatePath('/settings')
revalidatePath('/customize')
return { id: data.id }
}
@@ -105,7 +105,7 @@ export async function updateCustomRole(roleId: string, updates: {
.eq('space_id', member.space_id)
if (error) return { error: error.message }
revalidatePath('/settings')
revalidatePath('/customize')
return { success: true as const }
}
@@ -125,7 +125,7 @@ export async function deleteCustomRole(roleId: string) {
.eq('space_id', member.space_id)
if (error) return { error: error.message }
revalidatePath('/settings')
revalidatePath('/customize')
return { success: true as const }
}
@@ -164,7 +164,7 @@ export async function assignCustomRole(memberId: string, customRoleId: string) {
if (error) return { error: error.message }
revalidatePath('/members')
revalidatePath('/settings')
revalidatePath('/customize')
return { success: true as const }
}
@@ -185,6 +185,6 @@ export async function unassignCustomRole(memberId: string, customRoleId: string)
if (error) return { error: error.message }
revalidatePath('/members')
revalidatePath('/settings')
revalidatePath('/customize')
return { success: true as const }
}