Skip to content

Commit 09792ec

Browse files
committed
Don't show an associated gameboard for the software project topic
1 parent a777b9d commit 09792ec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/app/components/pages/Topic.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {NOT_FOUND_TYPE, UserPreferencesDTO} from "../../../IsaacAppTypes";
1414
import {determineExamBoardFrom} from "../../services/examBoard";
1515
import {TitleAndBreadcrumb} from "../elements/TitleAndBreadcrumb";
1616
import {AnonUserExamBoardPicker} from "../elements/inputs/AnonUserExamBoardPicker";
17+
import {atLeastOne} from "../../services/validation";
1718

1819
const stateToProps = (state: AppState, {match: {params: {topicName}}}: {match: {params: {topicName: TAG_ID}}}) => ({
1920
topicName: topicName,
@@ -53,10 +54,10 @@ const TopicPageComponent = ({topicName, topicPage, fetchTopicSummary, userPrefer
5354
}
5455
<AnonUserExamBoardPicker className="text-right" />
5556

56-
{relatedConcepts &&
57+
{relatedConcepts && atLeastOne(relatedConcepts.length) &&
5758
<LinkToContentSummaryList items={relatedConcepts} search={searchQuery} className="my-4" />
5859
}
59-
{relatedQuestions &&
60+
{relatedQuestions && atLeastOne(relatedQuestions.length) &&
6061
<LinkToContentSummaryList items={relatedQuestions} search={searchQuery} className="my-4" />
6162
}
6263

@@ -66,11 +67,11 @@ const TopicPageComponent = ({topicName, topicPage, fetchTopicSummary, userPrefer
6667
<span className="d-none d-md-inline">Back to</span> {" "} All topics
6768
</Button>
6869
</Col>
69-
<Col size={6} className="text-center">
70+
{topicName != TAG_ID.softwareProject && <Col size={6} className="text-center">
7071
<Button tag={Link} to={`/gameboards#${topicName}_july19_${examBoard.toLowerCase()}`} color="secondary" size="lg" className="my-4" block>
7172
Topic gameboard
7273
</Button>
73-
</Col>
74+
</Col>}
7475
</Row>
7576
</Col>
7677
</Row>

0 commit comments

Comments
 (0)