Skip to content

Instantly share code, notes, and snippets.

@camwest
Last active July 6, 2020 21:03
Show Gist options
  • Save camwest/d5fd5099afc61676e4925cb8c1bdbb28 to your computer and use it in GitHub Desktop.
Save camwest/d5fd5099afc61676e4925cb8c1bdbb28 to your computer and use it in GitHub Desktop.
Pyramid
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
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