Last active
July 6, 2020 21:03
-
-
Save camwest/d5fd5099afc61676e4925cb8c1bdbb28 to your computer and use it in GitHub Desktop.
Pyramid
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
Pyramid | |
Core App | |
investing -> Investing | |
data vault -> Data Vault | |
rewards -> Rewards | |
profile -> Profile | |
Investing | |
Data Vault | |
Rewards | |
invite friends -> Invite Prompt | |
Earn | |
Redeem | |
Invite Prompt | |
Profile |
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
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
if (views[current_state_name]) { | |
return views[current_state_name](); | |
} else { | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} | |
} | |
const views = { | |
'Earn': () => $('div', | |
$('h1', 'Earn'), | |
$('p', 'Earn a chance to win') | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment