Created
December 1, 2018 03:54
-
-
Save dangdennis/805869c2beb0cdc40382e2a2fb477a0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| render: self => | |
| <div> | |
| <ul> | |
| <li> <Link href="/"> {str("Home")} </Link> </li> | |
| <li> <Link href="/page1"> {str("Page 1")} </Link> </li> | |
| <li> <Link href="/page2"> {str("Page 2")} </Link> </li> | |
| <li> <Link href="/page3"> {str("Page 3")} </Link> </li> | |
| <li> <Link href="/nested/page4"> {str("Nested Page")} </Link> </li> | |
| <li> <Link href="/auth/*"> {str("Wild Card Auth Page")} </Link> </li> | |
| </ul> | |
| <div> | |
| { | |
| switch (self.state.route) { | |
| | Home => <h1> {str("You've reached the home page")} </h1> | |
| | Page1 => <h1> {str("You've reached page 1")} </h1> | |
| | Page2 => <h1> {str("You've reached page 2")} </h1> | |
| | Page3 => <h1> {str("You've reached page 3")} </h1> | |
| | Page4 => <h1> {str("You've reached page 4")} </h1> | |
| | WildCardPage(id) => | |
| <h1> {str("You've reached auth wild card: " ++ id)} </h1> | |
| | NotFound => <h1> {str("404 Page")} </h1> | |
| } | |
| } | |
| </div> | |
| </div>, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello I'm new and just wanted to introduce myself. What is it that your working on? If you don't mind me asking?