fix(admin): remove revalidatePath to prevent combobox reset after save
revalidatePath was causing the server component to re-render and potentially remount the client component, resetting all useState values. Since the client component already updates its local state optimistically after save, revalidatePath is unnecessary here. Also uninstalls agentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
'use server'
|
||||
|
||||
import { revalidatePath } from 'next/cache'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { auth } from '@/auth'
|
||||
import { sendEmail } from '@/lib/mail'
|
||||
@@ -57,7 +56,6 @@ export async function updateSystemConfig(data: Record<string, string>) {
|
||||
)
|
||||
|
||||
await prisma.$transaction(operations)
|
||||
revalidatePath('/admin/settings')
|
||||
return { success: true }
|
||||
} catch (error) {
|
||||
console.error('Failed to update settings:', error)
|
||||
|
||||
Reference in New Issue
Block a user