Fix conversation hydration — clear stale state before fresh fetch on mount

This commit is contained in:
2026-04-26 22:35:09 -04:00
parent 2c295b800e
commit fea6845ad7
+2
View File
@@ -59,6 +59,8 @@ export default function Home() {
document.documentElement.setAttribute('data-theme', s.theme || 'light');
document.documentElement.setAttribute('data-font', s.font_size || 'medium');
}).catch(console.error);
// Clear stale persisted conversations then fetch fresh
setConversations([]);
api.getConversations().then(setConversations).catch(console.error);
}, []);