change route works

This commit is contained in:
DieMyst 2020-11-30 21:35:08 +03:00
parent a235ed9cbd
commit b028804ea1
2 changed files with 4 additions and 7 deletions

View File

@ -57,10 +57,10 @@ routeCommand m r =
sendAir (DiscoverPeers.air m.peerId m.relayId)
Peer _ ->
sendAir (DiscoverPeers.air m.peerId m.relayId)
Cmd.none
Service string ->
sendAir (DiscoverPeers.air m.peerId m.relayId)
Cmd.none
Module string ->
sendAir (DiscoverPeers.air m.peerId m.relayId)
Cmd.none

View File

@ -21,8 +21,6 @@ import Blueprints.Model exposing (Blueprint)
import Browser
import Browser.Navigation as Nav
import Dict exposing (Dict)
import Json.Decode exposing (decodeValue, list, string)
import Json.Encode exposing (Value)
import Maybe exposing (withDefault)
import Model exposing (Model, PeerData, emptyPeerData)
import Msg exposing (..)
@ -41,14 +39,13 @@ update msg model =
UrlChanged url ->
let
_ = Debug.log "url changed" url
route =
Route.parse url
cmd =
Route.routeCommand model route
in
( { model | url = url }, cmd )
( { model | url = url, page = route }, cmd )
LinkClicked urlRequest ->
case urlRequest of