Skip to content

refactor(challenge-detail): remove finalSubmissionGuidelines usages #4808

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ const ChallengeSpecTab = ({ challenge }) => (
</article>
)
}
{
challenge.finalSubmissionGuidelines
&& (
<article>
<h2 styleName="h2">
Final Submission Guidelines
</h2>
<div
/* eslint-disable react/no-danger */
dangerouslySetInnerHTML={{
__html: challenge.finalSubmissionGuidelines,
}}
/* eslint-enable react/no-danger */
styleName="rawHtml"
/>
</article>
)
}
</div>
);

Expand Down
32 changes: 0 additions & 32 deletions src/shared/components/challenge-detail/Specification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default function ChallengeDetailsView(props) {
legacy,
legacyId,
documents,
finalSubmissionGuidelines,
userDetails,
metadata,
events,
Expand Down Expand Up @@ -196,35 +195,6 @@ export default function ChallengeDetailsView(props) {
</article>
)
}
{
finalSubmissionGuidelines
&& (
<article>
<h2>
Final Submission Guidelines
</h2>
{
editMode ? (
<Editor
connector={toolbarConnector}
id="submissionGuidelines"
initialMode={EDITOR_MODES.WYSIWYG}
ref={n => n && n.setHtml(finalSubmissionGuidelines)}
/>
) : (
<div
/* eslint-disable react/no-danger */
dangerouslySetInnerHTML={{
__html: finalSubmissionGuidelines,
}}
/* eslint-enable react/no-danger */
styleName="rawHtml"
/>
)
}
</article>
)
}
</div>
)
: (
Expand Down Expand Up @@ -408,7 +378,6 @@ ChallengeDetailsView.defaultProps = {
track: 'design',
reviewType: undefined,
numberOfCheckpointsPrizes: 0,
finalSubmissionGuidelines: '',
environment: '',
descriptionFormat: 'HTML',
codeRepo: '',
Expand Down Expand Up @@ -438,7 +407,6 @@ ChallengeDetailsView.propTypes = {
groups: PT.any,
reviewType: PT.string,
numberOfCheckpointsPrizes: PT.number,
finalSubmissionGuidelines: PT.string,
environment: PT.string,
codeRepo: PT.string,
userDetails: PT.shape({
Expand Down