Created
March 6, 2018 20:56
-
-
Save dclarke-modus/16f852f797fee8ba644fe0faf173c13b 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
import React from 'react'; | |
import {createFragmentContainer, graphql} from 'react-relay'; | |
import scopeAction from './actions/scopeModalAction'; | |
class Scope extends React.Component { | |
constructor(props, context) { | |
super(props, context); | |
this.editScope = this.editScope.bind(this); | |
} | |
render () { | |
return ( | |
<tr key={this.props.scope.id}> | |
<td>{this.props.scope.name}</td> | |
<td>{this.props.scope.description}</td> | |
<td></td> | |
<td></td> | |
<td> | |
<a className="btn" href="#" onClick={this.editScope}><i className="icon-edit"></i></a> | |
<a className="btn" href="#"><i className="icon-trash"></i></a> | |
</td> | |
</tr> | |
) | |
} | |
editScope () { | |
scopeAction.modal(this.props.scope, true); | |
} | |
} | |
module.exports = createFragmentContainer(Scope, graphql ` | |
fragment Scope_scope on Scope { | |
id | |
name | |
description | |
} | |
`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment