Remove unused code.

This commit is contained in:
Dillon Kearns 2022-02-07 21:07:54 -08:00
parent 50e81ca5de
commit 8f4491adf0
3 changed files with 2 additions and 36 deletions

View File

@ -44,7 +44,6 @@ plain old JSON in Elm.
import DataSource exposing (DataSource)
import DataSource.Http
import DataSource.Internal.Glob
import Json.Decode as Decode exposing (Decoder)

View File

@ -1,23 +1,13 @@
module Pages.ContentCache exposing
( ContentCache
, ContentJson
, Entry(..)
( Entry(..)
, Path
, init
, pathForUrl
)
import Dict exposing (Dict)
import Pages.Internal.NotFoundReason
import Pages.Internal.String as String
import RequestsAndPending exposing (RequestsAndPending)
import Url exposing (Url)
type alias ContentCache =
Dict Path Entry
type Entry
= Parsed
@ -26,26 +16,6 @@ type alias Path =
List String
init :
Maybe ( Path, ContentJson )
-> ContentCache
init maybeInitialPageContent =
case maybeInitialPageContent of
Nothing ->
Dict.empty
Just ( urls, _ ) ->
Dict.singleton urls Parsed
type alias ContentJson =
{ staticData : RequestsAndPending
, is404 : Bool
, path : Maybe String
, notFoundReason : Maybe Pages.Internal.NotFoundReason.Payload
}
pathForUrl : { currentUrl : Url, basePath : List String } -> Path
pathForUrl { currentUrl, basePath } =
currentUrl.path

View File

@ -12,7 +12,6 @@ import Html
import Http
import Json.Decode as JD exposing (Decoder)
import Json.Encode as Encode
import Pages.ContentCache as ContentCache exposing (ContentCache)
import Pages.Internal.NotFoundReason
import Pages.Internal.Platform.Cli exposing (..)
import Pages.Internal.Platform.Effect as Effect exposing (Effect)
@ -26,11 +25,9 @@ import Path
import ProgramTest exposing (ProgramTest)
import Regex
import RenderRequest
import Server.Request
import Server.Response as Response
import SimulatedEffect.Cmd
import SimulatedEffect.Ports
import SimulatedEffect.Sub
import SimulatedEffect.Task
import Task
import Test exposing (Test, describe, test)
@ -1019,7 +1016,7 @@ simulateEffects effect =
Effect.Continue ->
SimulatedEffect.Cmd.none
Effect.SendSinglePageNew done bytes toJsSuccessPayloadNewCombined ->
Effect.SendSinglePageNew done _ toJsSuccessPayloadNewCombined ->
SimulatedEffect.Cmd.batch
[ toJsSuccessPayloadNewCombined
|> Codec.encoder (ToJsPayload.successCodecNew2 "" "")