Refactor: Implement state machine cleanup and fixes

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 14:10:24 +00:00
parent 14b3305755
commit dcdb20386a
9 changed files with 55 additions and 209 deletions

View File

@@ -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