Lenny (Leonardo Garcia Crespo)
@leogcrespo
@leoasis
function App() {
const currentUrl = '/me';
return (
<Layout flex={[1, 3]}>
<Sidebar currentUrl={currentUrl}>
{userOptions.map(option => (
<SidebarOption key={option.name} option={option} />
)}
</Sidebar>
<Main>
<Title>Your public profile</Title>
<FetchUser id={getUserId('me')} />
{(response) => (
<Content>
{response.loading
? <LoadingIndicator />
: response.error
? <Error error={error} />
: <Profile user={response.user} />
}
</Content>
)}
</FetchUser>
</Main>
</Layout>
);
}
ReactDOM.render(<App />, document.getElementById('app'));
Lenny (Leonardo Garcia Crespo)
@leogcrespo
@leoasis