We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2e9cef commit 7f2f853Copy full SHA for 7f2f853
client-test/src/components/Challenges/index.tsx
@@ -273,10 +273,15 @@ const Challenges: React.FC = () => {
273
setIsRefreshing(true);
274
try {
275
await fetchDailyChallenge();
276
- toast.success("Problem of the Day is Solved!");
+ if (isSolved) {
277
+ toast.success("Problem of the Day is Solved!");
278
+ }
279
+ else {
280
+ toast.error("Haven't solved the Problem of the Day yet.");
281
282
} catch (error) {
283
console.error("Error updating POTD status:", error);
- toast.error("Haven't solved the Problem of the Day yet.");
284
+ toast.error("Error Checking for Status");
285
} finally {
286
setIsRefreshing(false);
287
}
0 commit comments