aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Route.elm
blob: dd435a665e94b13348afaaf53e4eb6e31902b1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Route
  ( Route(..)
  , matchers
  , toPath
  ) where

import Effects exposing (Effects)

import RouteParser exposing (..)

type Route =
  Home
  | User

matchers : List (Matcher Route)
matchers =
  [ static Home "/"
  , static User "/user"
  ]

toPath : Route -> String
toPath route =
  case route of
    Home -> "/"
    User -> "/user"