summaryrefslogtreecommitdiffstats
path: root/src/Routes.elm
blob: 04c7eb16e30776c3e255ae62ced53bfd114f4af6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Routes exposing (..)

import Types exposing (Route(..))
import Url.Parser exposing ((</>), Parser, oneOf, s, string, top)


routeParser : Parser (Route -> a) a
routeParser =
    oneOf
        [ Url.Parser.map Index top
        , Url.Parser.map Profile (s "profile" </> string)
        ]