Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
collinpreston committed Apr 5, 2024
1 parent 7e54840 commit b51d102
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions frontend/public/src/containers/pages/CatalogPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ export class CatalogPage extends React.Component<Props> {
this.resetQueryVariablesToDefault()
}
} else {
this.retrieveMorePrograms(
this.state.selectedDepartment
)
this.retrieveMorePrograms(this.state.selectedDepartment)
}
}
this.io = new window.IntersectionObserver(
Expand Down Expand Up @@ -334,9 +332,7 @@ export class CatalogPage extends React.Component<Props> {
if (this.renderNumberOfCatalogItems() === 0) {
this.setState({ selectedDepartment: ALL_DEPARTMENTS })
}
this.retrieveMorePrograms(
this.state.selectedDepartment
)
this.retrieveMorePrograms(this.state.selectedDepartment)
}
}
if (selectTabName === COURSES_TAB) {
Expand Down Expand Up @@ -398,11 +394,12 @@ export class CatalogPage extends React.Component<Props> {
selectedDepartmentSlug,
this.state.allCoursesRetrieved
)
this.countAndRetrieveMoreCourses(filteredCatalogItems, selectedDepartmentSlug)
} else if (this.state.tabSelected === PROGRAMS_TAB) {
this.retrieveMorePrograms(
this.countAndRetrieveMoreCourses(
filteredCatalogItems,
selectedDepartmentSlug
)
} else if (this.state.tabSelected === PROGRAMS_TAB) {
this.retrieveMorePrograms(selectedDepartmentSlug)
const filteredProgramsByDepartment = this.filteredCoursesOrProgramsByDepartment(
selectedDepartmentSlug,
this.state.allProgramsRetrieved
Expand Down Expand Up @@ -471,12 +468,9 @@ export class CatalogPage extends React.Component<Props> {
* This will update the following state variables:
* - allProgramsRetrieved, updated by adding newly retrieved programs.
* - programQueryPage, increment by 1.
* - filteredPrograms, update with newly filtered programs.
* - filterProgramsCalled, set to true.
*
* @param {string} selectedDepartmentSlug
*/
retrieveMorePrograms(selectedDepartmentSlug) {
retrieveMorePrograms() {
const { programsNextPage, getNextProgramPage } = this.props
if (
programsNextPage &&
Expand Down

0 comments on commit b51d102

Please sign in to comment.