// @flow import React from 'react'; import { observer } from 'mobx-react'; import Flex from 'components/Flex'; import ApiKeyRow from './components/ApiKeyRow'; import styles from './Settings.scss'; import SettingsStore from './SettingsStore'; import Button from 'components/Button'; import Input from 'components/Input'; import CenteredContent from 'components/CenteredContent'; import SlackAuthLink from 'components/SlackAuthLink'; import PageTitle from 'components/PageTitle'; @observer class Settings extends React.Component { store: SettingsStore; constructor() { super(); this.store = new SettingsStore(); } render() { const showSlackSettings = DEPLOYMENT === 'hosted'; return ( {showSlackSettings &&

Slack

Connect Atlas to your Slack to instantly search for your documents using /atlas command.

Add to Slack
}

API access

Create API tokens to hack on your Atlas. Learn more in API documentation.

{this.store.apiKeys && {this.store.apiKeys && this.store.apiKeys.map(key => ( ))}
}
); } } class InlineForm extends React.Component { props: { placeholder: string, buttonLabel: string, name: string, value: ?string, onChange: Function, onSubmit: Function, disabled?: ?boolean, }; validationTimeout: number; state = { validationError: false, }; componentWillUnmount() { clearTimeout(this.validationTimeout); } handleSubmit = event => { event.preventDefault(); if (this.props.value) { this.props.onSubmit(); } else { this.setState({ validationError: true, }); this.validationTimeout = setTimeout( () => this.setState({ validationError: false, }), 2500 ); } }; render() { const { placeholder, value, onChange, buttonLabel } = this.props; const { validationError } = this.state; return (