Created
November 11, 2015 17:28
-
-
Save saikat/9d138917860c88982c6e 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 AdminDashboard extends React.Component { | |
render() { | |
return <GroupCallViewer callId="R3JvdXBDYWxsOjFjOGUzOWVlLTAyOWYtNDIyMS05OTA3LTkxYWRmYmNkMjZiYw==" viewer={this.props.viewer}/> | |
} | |
} | |
export default Relay.createContainer(AdminDashboard, { | |
fragments: { | |
viewer: (variables) => Relay.QL` | |
fragment on Viewer { | |
${GroupCallViewer.getFragment('viewer', variables)} | |
} | |
` | |
} | |
}); | |
export class GroupCallViewer extends React.Component { | |
render() { | |
return <GroupCall groupCall={this.props.viewer.groupCall} /> | |
} | |
} | |
export default Relay.createContainer(GroupCallViewer, { | |
initialVariables: { | |
callId: "R3JvdXBDYWxsOjc2MmUxYTYxLTYyNDYtNGU0MS1hMjYzLWI1MzU4ZDU0NmNjMA==" | |
}, | |
fragments: { | |
viewer: (variables) => Relay.QL` | |
fragment on Viewer { | |
groupCall(id:$callId) { | |
${GroupCall.getFragment('groupCall')} | |
} | |
} | |
`, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment