aboutsummaryrefslogtreecommitdiff
path: root/src/main.ts
diff options
context:
space:
mode:
authorJoris2021-05-18 12:56:36 +0200
committerJoris2021-05-18 12:56:36 +0200
commitcde24cbf3fbc418af3c98d82e47dcd5df71e5b26 (patch)
tree994d532d2d7196ca2dda6f39cdfba36f83d455ce /src/main.ts
parentd1ce8774ec3291374c222c8f64c085e3a99f6147 (diff)
downloadtabata-cde24cbf3fbc418af3c98d82e47dcd5df71e5b26.tar.gz
tabata-cde24cbf3fbc418af3c98d82e47dcd5df71e5b26.tar.bz2
tabata-cde24cbf3fbc418af3c98d82e47dcd5df71e5b26.zip
Improve route type
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.ts b/src/main.ts
index 436a217..8cc1a91 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -4,10 +4,10 @@ import * as Timer from 'view/timer'
import * as Router from 'router'
export function showPage(route: Router.Route) {
- if (route.kind === Router.Kind.Form) {
+ if (route.name === 'form') {
document.body.innerHTML = ''
document.body.appendChild(Form.view(route.config, showPage))
- } else if (route.kind === Router.Kind.Timer) {
+ } else if (route.name === 'timer') {
document.body.innerHTML = ''
document.body.appendChild(Timer.view(route.config, showPage))
}