Remove ResultId

This commit is contained in:
Richard Feldman
2016-08-19 03:49:41 -07:00
parent dee37fa458
commit 533638108d
11 changed files with 31 additions and 71 deletions

View File

@@ -84,16 +84,12 @@ type alias Model =
type alias SearchResult =
{ id : ResultId
{ id : Int
, name : String
, stars : Int
}
type alias ResultId =
Int
initialModel : Model
initialModel =
{ query = "tutorial"
@@ -139,8 +135,7 @@ viewSearchResult result =
type Msg
= SetQuery String
| DeleteById ResultId
| SetResults (List SearchResult)
| DeleteById Int
update : Msg -> Model -> Model
@@ -149,13 +144,6 @@ update msg model =
SetQuery query ->
{ model | query = query }
SetResults results ->
let
newModel =
{ model | results = results }
in
newModel
DeleteById idToHide ->
let
newResults =