Created
October 4, 2017 20:04
-
-
Save denisraslov/5d24a6faa19ee4091d9df4c8adb0e3f1 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
import React from 'react'; | |
import AdminContent from 'react/components/adminContent'; | |
import UserContent from 'react/components/userContent'; | |
class Page extends React.PureComponent { | |
render() { | |
// a Backbone way - still using the global APP instance | |
if (APP.isUserAdmin()) { | |
return <AdminContent />; | |
} else { | |
return <UserContent />; | |
} | |
} | |
} | |
export default Page; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment