smoother name updates
All checks were successful
Deploy to Server / deploy (push) Successful in 30s

This commit is contained in:
2026-04-10 21:56:11 -05:00
parent c124e20ccc
commit fcab41e72e

View File

@@ -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);
}