Created
July 18, 2018 07:43
-
-
Save rajatk16/600b10901ceb5135b12ffb1ba47c7e2a 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
| export default class Profile extends PureComponent { | |
| static propTypes = { | |
| userIsLoaded: PropTypes.bool, | |
| user: PropTypes.shape({ | |
| _id: PropTypes.string, | |
| }).isRequired, | |
| } | |
| static defaultProps = { | |
| userIsLoaded: false, | |
| } | |
| render() { | |
| const { userIsLoaded, user } = this.props; | |
| if (!userIsLoaded) return <Loaded />; | |
| return ( | |
| <div> | |
| <div className="two-col"> | |
| <section> | |
| <MyOrders userId={user.id} /> | |
| <My Downloads userId={user._id} /> | |
| </section> | |
| <aside> | |
| <MySubscriptions user={user} /> | |
| <MyVotes user={user} /> | |
| </aside> | |
| </div> | |
| <div className="one-col"> | |
| {isRole('affiliate', user={user._id} && | |
| <MyAffiliateInfo userId={user._id} /> | |
| } | |
| </div> | |
| </div> | |
| ) | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you have some issues at https://gist.github.com/rajatk16/600b10901ceb5135b12ffb1ba47c7e2a#file-profile-js-L29