Last active
January 24, 2019 18:46
-
-
Save mlms13/73165d811821ace49e898fb5ecf95f76 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
let render = ({ state }) => { | |
let { viewport, page } = state; | |
let { width, height } = viewport; | |
let content = | |
switch (page) { | |
| Overview => <Welcome /> | |
| ShowUsers(users) => <UserTable users /> | |
| NewUser(userForm) => <AddUser user=userForm /> | |
}; | |
let body = | |
if (width < 768) | |
<Col> <Nav /> <PageContent content /> <HelpLinks /> </Col> | |
else if (width < 1024) | |
<Row spacing=20> | |
<Nav /> | |
<Col width=Fill> | |
<PageContent content /> | |
<HelpLinks /> | |
</Col> | |
</Row> | |
else | |
<Row spacing=30> <Nav /> <PageContent content /> <HelpLinks /> </Row>; | |
<Col> | |
<AppHeader /> | |
{ body } | |
</Col> | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment