Skip to content

Commit

Permalink
fix: import course error
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Jul 12, 2024
1 parent d104939 commit e105063
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dont-deploy-prod-at-4am.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"web": minor
---

fix: import course error
4 changes: 3 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
"@cgr/project-config": "1.3.0",
"@cgr/schema": "1.5.0"
},
"changesets": []
"changesets": [
"dont-deploy-prod-at-4am"
]
}
4 changes: 2 additions & 2 deletions apps/web/src/pages/[studyProgram]/schedule/import/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function ImportSchedulePage({ items, errorMessage }: ImportPageProps) {
courseCartStore.addItem(course, sectionNo)
})

if (!errorMessage) router.replace(buildLink(`/schedule`))
if (errorMessage.length === 0) router.replace(buildLink(`/schedule`))
}
fn()
}, [items, router, buildLink, errorMessage])
Expand All @@ -57,7 +57,7 @@ function ImportSchedulePage({ items, errorMessage }: ImportPageProps) {
<>
<Loading loading />

{errorMessage && (
{errorMessage.length > 0 && (
<div>
<p>ERROR</p>

Expand Down

0 comments on commit e105063

Please sign in to comment.