Skip to content

Commit

Permalink
Update course.ts
Browse files Browse the repository at this point in the history
changed if else writing style
  • Loading branch information
DawinYurtseven authored Jan 11, 2024
1 parent f03cd0a commit 6470357
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions web/ts/components/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,10 @@ export function courseContext(slug: string, year: number, term: string, userId:
},

toggleListView() {
if (this.viewMode == ViewMode.Grid) {
this.viewMode = ViewMode.List;
} else {
this.viewMode = ViewMode.Grid;
}
this.viewMode =
this.viewMode === ViewMode.Grid
? ViewMode.List
: ViewMode.Grid;
setInStorage("viewMode", this.viewMode.toString());
},

Expand Down

0 comments on commit 6470357

Please sign in to comment.