refactor(notifications): fetch from backend API instead of local generation
Rewrite store/notifications.ts to fetch via listNotifications API and remove local generateId-based notification creation. The store now acts as a simple cache with fetch/invalidate methods. Header unread count reads from this API-backed cache.
This commit is contained in:
+5
-1
@@ -8,7 +8,11 @@ export { sendEmailVerificationCode } from "./email"
|
||||
export { isFavorited, listFavorites } from "./favorites"
|
||||
export { getFileById, uploadFile } from "./files"
|
||||
export { getGameById, listGames } from "./games"
|
||||
export { listNotifications, markNotificationAsRead } from "./notifications"
|
||||
export {
|
||||
listNotifications,
|
||||
markAllNotificationsAsRead,
|
||||
markNotificationAsRead,
|
||||
} from "./notifications"
|
||||
export { getOrderById, listOrders, listOrdersByConsumer } from "./orders"
|
||||
export { getPlayerById, listPlayers, listPlayersByShop } from "./players"
|
||||
export { createPost, getPostById, listPosts, listPostsByAuthor, togglePostLike } from "./posts"
|
||||
|
||||
Reference in New Issue
Block a user