diff --git a/src/servers/CreateServer.js b/src/servers/CreateServer.js index 4f3331c5..6cda5046 100644 --- a/src/servers/CreateServer.js +++ b/src/servers/CreateServer.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { createServer } from './reducers/server'; import { resetSelectedServer } from './reducers/selectedServer'; import { v4 as uuid } from 'uuid'; - +import { UncontrolledTooltip } from 'reactstrap'; import './CreateServer.scss'; export class CreateServer extends React.Component { @@ -14,20 +14,31 @@ export class CreateServer extends React.Component { apiKey: '', }; + submit = e => { + e.preventDefault(); + + const { createServer, history: { push } } = this.props; + const server = assoc('id', uuid(), this.state); + + createServer(server); + push(`/server/${server.id}/list-short-urls/1`) + }; + + constructor(props) { + super(props); + this.fileRef = React.createRef(); + } + componentDidMount() { this.props.resetSelectedServer(); } render() { - const submit = e => { - e.preventDefault(); - const server = assoc('id', uuid(), this.state); - this.props.createServer(server); - this.props.history.push(`/server/${server.id}/list-short-urls/1`) - }; const renderInputGroup = (id, placeholder, type = 'text') =>