Prioritize unread and newest notifications in adapter service

cgen-9abbf309a6eb42d0a0c516cc13bb9a31
This commit is contained in:
Builder.io 2025-10-18 03:43:02 +00:00
parent ba7b963ecb
commit e5a5607728

View file

@ -1023,8 +1023,9 @@ export const aethexNotificationService = {
.from("notifications")
.select("*")
.eq("user_id", userId)
.order("read", { ascending: true })
.order("created_at", { ascending: false })
.limit(10);
.limit(20);
if (error) {
console.warn("Error fetching notifications:", error);