From fcab41e72e61e5e7db7861d4297338ee1bd09974 Mon Sep 17 00:00:00 2001 From: pulipakaa24 Date: Fri, 10 Apr 2026 21:56:11 -0500 Subject: [PATCH] smoother name updates --- components/ProfileSettings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/ProfileSettings.tsx b/components/ProfileSettings.tsx index 73f86a4..262da77 100644 --- a/components/ProfileSettings.tsx +++ b/components/ProfileSettings.tsx @@ -4,7 +4,7 @@ import { Button } from './ui/button'; import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; import { Input } from './ui/input'; import { Label } from './ui/label'; -import { useSession, signOut, updateUser } from '../lib/auth-client'; +import { authClient, useSession, signOut, updateUser } from '../lib/auth-client'; import { validatePhoneOrEmail } from '../lib/validators'; export function ProfileSettings() { @@ -59,6 +59,7 @@ export function ProfileSettings() { const data = await res.json().catch(() => ({})); setNameError(data.error || 'Failed to save name.'); } else { + await authClient.getSession({ fetchOptions: { cache: 'no-store' } }); setNameSaved(true); setTimeout(() => setNameSaved(false), 3000); }