Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Clean up route
Browse files Browse the repository at this point in the history
  • Loading branch information
rl-king committed Mar 15, 2019
1 parent c9eaf42 commit c270c19
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/Route.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import Url.Builder as Builder
import Url.Parser exposing ((</>), Parser)



-- DEFINITIONS


type Route
= Root
| Article Id
| Article Int
| NotFound


type alias Id =
Int



-- PARSE

Expand Down Expand Up @@ -82,9 +82,4 @@ Type checked internal links.
-}
link : Route -> List (Attribute msg) -> List (Html msg) -> Html msg
link route attributes content =
a
([ href (toUrl route)
]
++ attributes
)
content
a (href (toUrl route) :: attributes) content

0 comments on commit c270c19

Please sign in to comment.