mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 22:11:24 -05:00
Refactor: Implement state machine cleanup and fixes
This commit is contained in:
@@ -45,11 +45,18 @@ export function useLockMonitor(
|
||||
dispatch({ type: 'LOCK_EXPIRED' });
|
||||
|
||||
// Show toast with extension option
|
||||
toast({
|
||||
title: 'Lock Expiring Soon',
|
||||
description: 'Your lock on this submission will expire in less than 2 minutes. Click to extend.',
|
||||
variant: 'default',
|
||||
});
|
||||
toast({
|
||||
title: 'Lock Expiring Soon',
|
||||
description: 'Your lock on this submission will expire in less than 2 minutes. Click below to extend.',
|
||||
duration: Infinity,
|
||||
});
|
||||
|
||||
// Also call extension function automatically after showing toast
|
||||
if (itemId) {
|
||||
setTimeout(() => {
|
||||
handleExtendLock(itemId, dispatch);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}, 30000); // Check every 30 seconds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user