-
Notifications
You must be signed in to change notification settings - Fork 51
[PROD RELEASE] #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PROD RELEASE] #1653
Changes from all commits
4ec89b1
6b81b05
cd5322c
1e3c8e0
0eb4fb3
8390251
713528f
a211634
6063bbe
f489bae
0b819d7
fc93578
9c67f2b
3b67a7e
153ab96
1aa70f4
78755ed
b3eb22c
612a798
8d4d3a8
37c544a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ module.exports = { | |
CHALLENGE_TRACKS_URL: `${PROD_API_HOSTNAME}/v5/challenge-tracks`, | ||
CHALLENGE_PHASES_URL: `${PROD_API_HOSTNAME}/v5/challenge-phases`, | ||
CHALLENGE_TIMELINES_URL: `${PROD_API_HOSTNAME}/v5/challenge-timelines`, | ||
COPILOTS_URL: `https://copilots.${DOMAIN}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
PROJECT_API_URL: `${PROD_API_HOSTNAME}/v5/projects`, | ||
GROUPS_API_URL: `${PROD_API_HOSTNAME}/v5/groups`, | ||
TERMS_API_URL: `${PROD_API_HOSTNAME}/v5/terms`, | ||
|
@@ -58,6 +59,5 @@ module.exports = { | |
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`, | ||
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`, | ||
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=', | ||
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8', | ||
PROFILE_URL: 'https://profiles.topcoder.com/' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ import { fetchSubmissions } from '../services/challenges' | |
|
||
import { LOAD_CHALLENGE_SUBMISSIONS } from '../config/constants' | ||
|
||
export function loadSubmissions (challengeId) { | ||
return dispatch => { | ||
export function loadSubmissions (challengeId, page) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function |
||
return (dispatch) => { | ||
if (challengeId) { | ||
dispatch({ | ||
type: LOAD_CHALLENGE_SUBMISSIONS, | ||
payload: fetchSubmissions(challengeId) | ||
payload: fetchSubmissions(challengeId, page) | ||
}) | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,11 @@ const ChallengeViewTabs = ({ | |
loggedInUser, | ||
onApproveChallenge, | ||
createResource, | ||
deleteResource | ||
deleteResource, | ||
loadSubmissions, | ||
totalSubmissions, | ||
submissionsPerPage, | ||
page | ||
}) => { | ||
const [selectedTab, setSelectedTab] = useState(0) | ||
const [showAddResourceModal, setShowAddResourceModal] = useState(false) | ||
|
@@ -114,7 +118,7 @@ const ChallengeViewTabs = ({ | |
}) | ||
return s | ||
}) | ||
}, [challengeSubmissions, allResources]) | ||
}, [challengeSubmissions, allResources, page]) | ||
|
||
const isTask = _.get(challenge, 'task.isTask', false) | ||
|
||
|
@@ -298,7 +302,7 @@ const ChallengeViewTabs = ({ | |
> | ||
RESOURCES | ||
</a> | ||
{challengeSubmissions.length ? ( | ||
{totalSubmissions ? ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider renaming |
||
<a | ||
tabIndex='2' | ||
role='tab' | ||
|
@@ -311,7 +315,7 @@ const ChallengeViewTabs = ({ | |
}} | ||
className={getSelectorStyle(selectedTab, 2)} | ||
> | ||
SUBMISSIONS ({submissions.length}) | ||
SUBMISSIONS ({totalSubmissions}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that |
||
</a> | ||
) : null} | ||
</div> | ||
|
@@ -353,6 +357,10 @@ const ChallengeViewTabs = ({ | |
submissions={submissions} | ||
token={token} | ||
loggedInUserResource={loggedInUserResource} | ||
loadSubmissions={loadSubmissions} | ||
totalSubmissions={totalSubmissions} | ||
submissionsPerPage={submissionsPerPage} | ||
page={page} | ||
/> | ||
)} | ||
{showAddResourceModal ? (<ResourcesAdd | ||
|
@@ -396,7 +404,11 @@ ChallengeViewTabs.propTypes = { | |
deleteResource: PropTypes.func.isRequired, | ||
showRejectChallengeModal: PropTypes.func.isRequired, | ||
loggedInUser: PropTypes.object.isRequired, | ||
onApproveChallenge: PropTypes.func | ||
onApproveChallenge: PropTypes.func, | ||
loadSubmissions: PropTypes.func, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
totalSubmissions: PropTypes.number, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
submissionsPerPage: PropTypes.number, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
page: PropTypes.number | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
} | ||
|
||
export default ChallengeViewTabs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using the
DEV_API_HOSTNAME
variable for consistency with other URLs, unlessDOMAIN
is intended to be different for this specific endpoint.