mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Remove some Debug statements.
This commit is contained in:
parent
dfb9a81761
commit
da6e7d7313
@ -15,6 +15,7 @@ type Effect msg
|
||||
| Cmd (Cmd msg)
|
||||
| Batch (List (Effect msg))
|
||||
| GetStargazers (Result Http.Error Int -> msg)
|
||||
| SetField { formId : String, name : String, value : String }
|
||||
| FetchRouteData
|
||||
{ data : Maybe FormDecoder.FormData
|
||||
, toMsg : Result Http.Error Url -> msg
|
||||
@ -74,6 +75,9 @@ map fn effect =
|
||||
, toMsg = fetchInfo.toMsg >> fn
|
||||
}
|
||||
|
||||
SetField info ->
|
||||
SetField info
|
||||
|
||||
SubmitFetcher fetcher ->
|
||||
fetcher
|
||||
|> Pages.Fetcher.map fn
|
||||
@ -96,6 +100,7 @@ perform :
|
||||
-> Cmd msg
|
||||
, fromPageMsg : pageMsg -> msg
|
||||
, key : Browser.Navigation.Key
|
||||
, setField : { formId : String, name : String, value : String } -> Cmd msg
|
||||
}
|
||||
-> Effect pageMsg
|
||||
-> Cmd msg
|
||||
@ -107,6 +112,9 @@ perform ({ fromPageMsg, key } as helpers) effect =
|
||||
Cmd cmd ->
|
||||
Cmd.map fromPageMsg cmd
|
||||
|
||||
SetField info ->
|
||||
helpers.setField info
|
||||
|
||||
Batch list ->
|
||||
Cmd.batch (List.map (perform helpers) list)
|
||||
|
||||
|
@ -615,9 +615,6 @@ config =
|
||||
}
|
||||
|
||||
onActionData actionData =
|
||||
let
|
||||
_ = Debug.log "onActionData" actionData
|
||||
in
|
||||
case actionData of
|
||||
${templates
|
||||
.map(
|
||||
|
@ -93,7 +93,7 @@ update eventObject pageFormState =
|
||||
-- pageFormState
|
||||
--
|
||||
--else
|
||||
case eventObject |> Decode.decodeValue fieldEventDecoder |> Debug.log "fieldEvent" of
|
||||
case eventObject |> Decode.decodeValue fieldEventDecoder of
|
||||
Ok fieldEvent ->
|
||||
pageFormState
|
||||
|> Dict.update fieldEvent.formId
|
||||
|
@ -835,8 +835,17 @@ startFetcher options model =
|
||||
|> Just
|
||||
|> Ok
|
||||
|
||||
_ ->
|
||||
Debug.todo ""
|
||||
Http.BadUrl_ string ->
|
||||
Err <| Http.BadUrl string
|
||||
|
||||
Http.Timeout_ ->
|
||||
Err <| Http.Timeout
|
||||
|
||||
Http.NetworkError_ ->
|
||||
Err <| Http.NetworkError
|
||||
|
||||
Http.BadStatus_ metadata body ->
|
||||
Err <| Http.BadStatus metadata.statusCode
|
||||
)
|
||||
, tracker = Nothing
|
||||
, body = Http.stringBody "application/x-www-form-urlencoded" encodedBody
|
||||
@ -867,10 +876,17 @@ startFetcher2 formData model =
|
||||
-- TODO maybe have an optional way to pass the bytes through?
|
||||
Ok Nothing
|
||||
|
||||
_ ->
|
||||
-- TODO where should errors go in application state? Should there be an onError where you can receive application-managed error events that are owned by
|
||||
-- the Platform Model/Msg's?
|
||||
Debug.todo ""
|
||||
Http.BadUrl_ string ->
|
||||
Err <| Http.BadUrl string
|
||||
|
||||
Http.Timeout_ ->
|
||||
Err <| Http.Timeout
|
||||
|
||||
Http.NetworkError_ ->
|
||||
Err <| Http.NetworkError
|
||||
|
||||
Http.BadStatus_ metadata body ->
|
||||
Err <| Http.BadStatus metadata.statusCode
|
||||
)
|
||||
, tracker = Nothing
|
||||
|
||||
|
@ -647,7 +647,6 @@ nextStepToEffect site config model ( updatedStaticResponsesModel, nextStep ) =
|
||||
config.sharedData
|
||||
model.allRawResponses
|
||||
|> Result.mapError (StaticHttpRequest.toBuildError "")
|
||||
|> Debug.log "@@@sharedData"
|
||||
|
||||
apiResponse : Effect
|
||||
apiResponse =
|
||||
@ -772,7 +771,6 @@ sendSinglePageProgress site contentJson config model info =
|
||||
case includeHtml of
|
||||
RenderRequest.OnlyJson ->
|
||||
pageDataResult
|
||||
|> Debug.log "pageDataResult"
|
||||
|> Result.map
|
||||
(\okPageData ->
|
||||
case okPageData of
|
||||
@ -896,7 +894,6 @@ sendSinglePageProgress site contentJson config model info =
|
||||
}
|
||||
)
|
||||
|
||||
--Debug.todo ""
|
||||
currentUrl : Url
|
||||
currentUrl =
|
||||
{ protocol = Url.Https
|
||||
|
Loading…
Reference in New Issue
Block a user