Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Commit 3666023

Browse files
committed
Make SchoolCard keys random and disable error-handling lint warning
1 parent 29b23a2 commit 3666023

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/scenes/home/codeSchools/approvedSchools/approvedSchools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ApprovedSchools extends Component {
3535
.map(school =>
3636
(
3737
<SchoolCard
38-
key={school.address}
38+
key={`${Math.random()} + ${school.name}`}
3939
alt={school.name}
4040
schoolName={school.name}
4141
link={school.url}

src/scenes/home/codeSchools/onlineSchools/onlineSchools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class OnlineSchools extends Component {
3737
const eSchools = this.state.eSchools.map(school =>
3838
(
3939
<SchoolCard
40-
key={school.address}
40+
key={`${Math.random()} + ${school.name}`}
4141
alt={school.name}
4242
schoolName={school.name}
4343
link={school.url}

src/scenes/home/codeSchools/stateSortedSchools/stateSortedSchools.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ class StateSortedSchools extends Component {
3838
return thisCampus.state.includes(thisInput) || stateName.includes(thisInput);
3939
} catch (e) {
4040
if (e instanceof TypeError) {
41+
/* eslint-disable no-console */
4142
console.log('Error: Typo in code_schools.yaml on the back-end under the `state` field');
4243
console.log(e);
44+
/* eslint-disable no-console */
4345
return false;
4446
}
4547
// Unknown error issue

0 commit comments

Comments
 (0)