|
65 | 65 | expandedSections = expandedSections; |
66 | 66 | } |
67 | 67 |
|
68 | | - // Update cooldown status |
69 | | - updateCooldownStatus(); |
70 | | - cooldownInterval = setInterval(updateCooldownStatus, 1000); |
| 68 | + // Update cooldown status (disabled for dsa-bootcamp) |
| 69 | + if ($page.params.trackName !== 'dsa-bootcamp') { |
| 70 | + updateCooldownStatus(); |
| 71 | + cooldownInterval = setInterval(updateCooldownStatus, 1000); |
| 72 | + } else { |
| 73 | + // For dsa-bootcamp, always allow completion |
| 74 | + canCompleteNow = true; |
| 75 | + } |
71 | 76 |
|
72 | 77 | return () => { |
73 | 78 | if (cooldownInterval) clearInterval(cooldownInterval); |
|
99 | 104 | return; // Prevent double submissions |
100 | 105 | } |
101 | 106 |
|
102 | | - if (!canCompleteNow) { |
| 107 | + // Cooldown check (disabled for dsa-bootcamp) |
| 108 | + if ($page.params.trackName !== 'dsa-bootcamp' && !canCompleteNow) { |
103 | 109 | toast.info(`⏱️ Take a quick break! You can submit again in ${cooldownTimeString}.\n\nCome back stronger! 💪`, 5000); |
104 | 110 | return; |
105 | 111 | } |
|
127 | 133 |
|
128 | 134 | // Update local state IMMEDIATELY for instant UI feedback |
129 | 135 | lastCompletedAt = new Date().toISOString(); |
130 | | - updateCooldownStatus(); |
| 136 | + // Update cooldown status (disabled for dsa-bootcamp) |
| 137 | + if ($page.params.trackName !== 'dsa-bootcamp') { |
| 138 | + updateCooldownStatus(); |
| 139 | + } |
131 | 140 |
|
132 | 141 | // Track this problem as locally completed (for optimistic UI) |
133 | 142 | locallyCompletedIds.add(problemId); |
|
224 | 233 | totalBloksEarned = data.totalBloksEarned; |
225 | 234 | lastCompletedAt = data.lastCompletedAt; |
226 | 235 | user = data.user; |
227 | | - updateCooldownStatus(); |
| 236 | + // Update cooldown status (disabled for dsa-bootcamp) |
| 237 | + if ($page.params.trackName !== 'dsa-bootcamp') { |
| 238 | + updateCooldownStatus(); |
| 239 | + } |
228 | 240 | } |
229 | 241 | </script> |
230 | 242 |
|
|
0 commit comments