zkayser / pokerex_client

Elm client for PokerEx project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor the `NavBarDropdown` widget

zkayser opened this issue · comments

The NavBarDropdown widget renders links to different pages of the app in a dropdown list. The current implementation is to limited in that it only takes a string from an itemPicked property on the Dropdown Config type. The itemPicked is currently implemented as a String -> String function, but this needs to be changed to allow for the following scenarios:

  1. Allow for arbitrary no-argument messages to be emitted from the Main module. This will be needed, for example, for the Logout nav item.
  2. Change the Route to reflect the item that was selected. This functionality should work the same as it does for the desktop version of the Header, which can be found in Header.elm

[12/17] DONE