File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,30 @@ const App: React.FC = () => {
227227 } ;
228228 } , [ isRemote , isConnected ] ) ;
229229
230+ useEffect ( ( ) => {
231+ if ( ! isRemote || ! isConnected ) return ;
232+
233+ let timer : number | null = null ;
234+
235+ const refreshClaims = async ( ) => {
236+ try {
237+ const claimed = await syncService . listClaimedParticipants ( ) ;
238+ setClaimedIds ( claimed ) ;
239+ } catch {
240+ // Realtime callback remains primary; this is just a resilience fallback.
241+ }
242+ } ;
243+
244+ void refreshClaims ( ) ;
245+ timer = window . setInterval ( ( ) => {
246+ void refreshClaims ( ) ;
247+ } , 2000 ) ;
248+
249+ return ( ) => {
250+ if ( timer ) window . clearInterval ( timer ) ;
251+ } ;
252+ } , [ isRemote , isConnected ] ) ;
253+
230254 const applySetup = async ( ) => {
231255 const nextConfig : AuctionConfig = {
232256 startPrice : Math . max ( 1 , Math . floor ( draftConfig . startPrice ) ) ,
You can’t perform that action at this time.
0 commit comments