var React = require('react/addons') var Catalyst = require('../Mixins/Catalyst') var ProfileImage = require('./ProfileImage') module.exports = React.createClass({ mixins: [Catalyst.LinkedStateMixin], propTypes: { close: React.PropTypes.func, currentPlanet: React.PropTypes.object }, getInitialState: function () { return { currentTab: 'planetProfile', planetName: this.props.currentPlanet.name, isDeletePlanetChecked: false, userName: '' } }, activePlanetProfile: function () { this.setState({currentTab: 'planetProfile'}) }, saveProfile: function () { var currentPlanet = this.props.currentPlanet PlanetActions.changeName(currentPlanet.userName, currentPlanet.name, this.state.planetName) }, handleChange: function (value) { this.setState({userName: value}) }, doubleCheckDeletePlanet: function () { if (this.state.isDeletePlanetChecked) { PlanetActions.deletePlanet(this.props.currentPlanet.userName, this.props.currentPlanet.name) return } this.setState({isDeletePlanetChecked: true}) React.findDOMNode(this.refs.deleteCancelButton).focus() }, cancelDeletePlanet: function () { this.setState({isDeletePlanetChecked: false}) }, interceptClick: function (e) { e.stopPropagation() }, render: function () { var content content = (
Are you sure to delete this planet?
) return (

Planet setting

{content}
) } })