import React, {Component, PropTypes} from 'react'; import {Dropdown, DropdownButton, DropdownItem, DropdownDivider} from '../base/dropdown'; import Link from '../base/Link'; import Modal from '../base/Modal'; import ModalBody from '../base/ModalBody'; import ModalHeader from '../base/ModalHeader'; import ModalFooter from '../base/ModalFooter'; import * as session from '../../../sync/session'; import LoginModal from './LoginModal'; import {showModal} from './index'; class WorkspaceShareSettingsModal extends Component { state = { teams: [] }; _handleShareWithTeam = team => { console.log('Share with ', team); }; async _load () { if (!session.isLoggedIn()) { showModal(LoginModal); } const teams = await session.listTeams(); this.setState({teams}); } _handleSubmit = e => { e.preventDefault(); }; _handleClose = () => this.hide(); _setModalRef = m => { this.modal = m; }; show () { this.modal.show(); this._load(); } render () { const {teams} = this.state; return (
); } } WorkspaceShareSettingsModal.propTypes = { workspace: PropTypes.object.isRequired, }; export default WorkspaceShareSettingsModal;