{
>
- {isDisabled && (
+ {isPendingCompletion && (
{
},
}}
/>
+
+ {
+ if (timeoutId) {
+ clearTimeout(timeoutId)
+ setIsPendingCompletion(false)
+ setTimeoutId(null)
+ setSecondsLeftToCancel(null) // Reset or adjust as needed
+ }
+ }}
+ size='md'
+ variant='outlined'
+ color='primary'
+ startDecorator={}
+ >
+ Cancel
+
+ }
+ >
+
+ Task will be marked as completed in {secondsLeftToCancel} seconds
+
+
>
)