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 e9f0be3 commit 76aba7eCopy full SHA for 76aba7e
src/shared/containers/tco/Leaderboard/ChallengeHistoryModal/index.jsx
@@ -1,4 +1,4 @@
1
-import React from 'react';
+import React, { useEffect } from 'react';
2
import ChallengeHistoryModal from 'components/Leaderboard/ChallengeHistoryModal';
3
import PT from 'prop-types';
4
import actions from 'actions/leaderboard';
@@ -14,9 +14,9 @@ function ChallengeHistoryModalContainer({
14
isCopilot,
15
isAlgo,
16
}) {
17
- if (!challenges && !loading) {
+ useEffect(() => {
18
getChallengesHistory(dataUrl, competitor);
19
- }
+ }, [competitor]);
20
21
return (
22
<ChallengeHistoryModal
0 commit comments