Commit 0d3e3f6e authored by Darya Rednikina's avatar Darya Rednikina
Browse files

fixed all errors from new elm-plugin

parent 446b3819
module Login exposing (..)
module Login exposing (Model, Msg(..), init, update, view)
import Browser exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Route exposing (..)
import Validation as V exposing (..)
import Html exposing (Html, a, button, div, fieldset, h1, input, p, text, ul)
import Html.Attributes exposing (class, placeholder, type_, value)
import Html.Events exposing (onInput, onSubmit)
import Route exposing (href)
import Validation as V exposing (Problem, ValidatedField, viewProblem)
init : ( Model, Cmd Msg )
......@@ -58,7 +57,7 @@ update msg model =
SubmittedForm ->
case validate model.form of
Ok validForm ->
Ok _ ->
( { model | problems = [] }
, Cmd.none
)
......@@ -148,8 +147,8 @@ trimFields form =
fieldsToValidate : List ValidatedField
fieldsToValidate =
[ Email
, Password
[ V.Email
, V.Password
]
......@@ -180,7 +179,7 @@ validateField (Trimmed form) field =
in
List.map (V.InvalidEntry field) <|
case field of
Email ->
V.Email ->
emptyValidation form.email "email can't be blank."
_ ->
......
module Main exposing (..)
module Main exposing (main)
import Browser exposing (..)
import Browser exposing (UrlRequest, application)
import Browser.Navigation as Nav
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html exposing (Html, h3, text)
import Login exposing (Model)
import Register exposing (Model)
import Route exposing (..)
import Route exposing (Route)
import Url exposing (Url)
......@@ -143,7 +141,7 @@ main =
init : () -> Url -> Nav.Key -> ( Model, Cmd Msg )
init flags url navKey =
init _ url navKey =
let
model =
{ route = Route.parseUrl url
......
module Register exposing (..)
import Browser exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import List exposing (..)
import Route exposing (..)
module Register exposing (Model, Msg(..), init, update, view)
import Html exposing (Html, a, button, div, fieldset, h1, input, p, text, ul)
import Html.Attributes exposing (class, placeholder, type_, value)
import Html.Events exposing (onInput, onSubmit)
import Route exposing (href)
import Validation as V exposing (Problem, ValidatedField)
......@@ -68,7 +66,7 @@ update msg model =
SubmittedForm ->
case validate model.form of
Ok validForm ->
Ok _ ->
( { model | problems = [] }
, Cmd.none
)
......
......@@ -3,7 +3,7 @@ module Route exposing (Route(..), href, parseUrl)
import Html exposing (Attribute)
import Html.Attributes as Attr
import Url exposing (Url)
import Url.Parser exposing (..)
import Url.Parser exposing (Parser, map, oneOf, parse, s, top)
type Route
......
module Validation exposing (..)
module Validation exposing (Problem(..), ValidatedField(..), viewProblem)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html exposing (Html, li, text)
type Problem
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment