Skip to content

Instantly share code, notes, and snippets.

@fdjones
Last active March 28, 2019 22:17
Show Gist options
  • Save fdjones/72586b38a923f465201016e1a85f70cd to your computer and use it in GitHub Desktop.
Save fdjones/72586b38a923f465201016e1a85f70cd to your computer and use it in GitHub Desktop.
class App extends React.Component {
constructor(...props) {
super(...props);
}
render() {
const { match, history } = this.props;
return (
<Route
exact
path={`${match.path}*`}
render={() => (
<UserProfileContainer
render={({ user, loading }) =>
checkUser(user, loading) && (
<I18n ns="alpha-beta">
{(translate, i18nConfig) => (
<div className="sus-app-reporting">
{checkLocale(user, i18nConfig) ? (
<Page
baseUrl={match.path}
content={settings}
history={history}
translate={withI18nDefault(translate)}
/>
) : (
<div className="loader-container">
<Loader active inline="centered" size="tiny" />
</div>
)}
</div>
)}
</I18n>
)
}
/>
)}
/>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment