Rename type and pass through.

This commit is contained in:
Dillon Kearns 2019-07-22 15:00:14 -07:00
parent 5b9110bf68
commit 5d1b5e6b76
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
module Content exposing (allData, pages, posts)
module Content exposing (Content, allData, pages, posts)
import Element exposing (Element)
import Index
@ -8,7 +8,7 @@ import MarkParser
import Result.Extra
type alias Data msg =
type alias Content msg =
{ posts :
List
( List String
@ -26,7 +26,7 @@ type alias Data msg =
}
allData : Result (Element msg) (Data msg)
allData : Result (Element msg) (Content msg)
allData =
case posts of
Ok postListings ->

View File

@ -2,7 +2,7 @@ module Main exposing (main)
import Browser
import Browser.Navigation as Nav
import Content
import Content exposing (Content)
import Element exposing (Element)
import Html exposing (..)
import Html.Attributes exposing (..)
@ -94,14 +94,14 @@ mainView : Url -> Element msg
mainView url =
case Content.allData of
Ok site ->
pageView url
pageView site url
Err errorView ->
errorView
pageView : Url -> Element msg
pageView url =
pageView : Content msg -> Url -> Element msg
pageView content url =
case lookupPage url of
Just page ->
case Mark.compile (MarkParser.document Element.none) page of