mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
feat: implement real-time updates for showcase ratings and comments
- Add automatic cache invalidation in useNostrPublish hook - Implement optimistic updates for comments with error recovery - Add instant visual feedback for ratings with rollback on error - Enhance moderation actions with immediate UI updates - Reduce stale times and refetch intervals for faster updates - Add loading states and visual indicators during submissions - Create comprehensive error handling with graceful degradation - Add RealTimeDemo component for testing real-time features - Update background polling for better real-time synchronization Users no longer need to refresh pages to see their updates. All actions (comments, ratings, moderation) now feel instant while maintaining data consistency and error recovery.
This commit is contained in:
1 parent
6f2ccb0b5a
commit
e709dca735
9 files changed
+552
-24
No files matched your search
@@ -223,8 +223,8 @@ export function useAppSubmissions() {
|
||||
|
||||
return submissions;
|
||||
},
|
||||
staleTime: 30000, // 30 seconds
|
||||
refetchInterval: 60000, // 1 minute
|
||||
staleTime: 10000, // 10 seconds
|
||||
refetchInterval: 30000, // 30 seconds
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user