Skip to content

Commit

Permalink
added
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreya Bhandari committed Sep 7, 2024
1 parent 5f812fe commit e365730
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/platform-logic/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ class Platform extends React.Component {
}

componentDidMount() {
const { setLanguage } = this.props;
if (this.props.lessonID == 5) {
setLanguage('se')
} else {
const defaultLocale = localStorage.getItem('defaultLocale');
setLanguage(defaultLocale)
}

this._isMounted = true;
if (this.props.lessonID != null) {
console.log("calling selectLesson from componentDidMount...")
Expand All @@ -97,6 +89,14 @@ class Platform extends React.Component {
);
}
);

const { setLanguage } = this.props;
if (lesson.courseName == 'Matematik 4') {
setLanguage('se')
} else {
const defaultLocale = localStorage.getItem('defaultLocale');
setLanguage(defaultLocale)
}
} else if (this.props.courseNum != null) {
this.selectCourse(coursePlans[parseInt(this.props.courseNum)]);
}
Expand Down

0 comments on commit e365730

Please sign in to comment.