Last active
March 28, 2019 22:17
-
-
Save fdjones/72586b38a923f465201016e1a85f70cd to your computer and use it in GitHub Desktop.
This file contains 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
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