improvement: add link

This commit is contained in:
frab1t 2019-07-03 20:48:11 +02:00
parent 0896e98697
commit 0971956b2e
1 changed files with 12 additions and 8 deletions

View File

@ -7,6 +7,7 @@ import {
Label,
Input
} from 'reactstrap';
import { Link } from 'react-router-dom';
import { config } from '../../config';
@ -33,7 +34,7 @@ class CreateTicket extends Component {
this.handleInputChange = this.handleInputChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
@ -49,7 +50,7 @@ class CreateTicket extends Component {
});
})
.catch((err) => {
});
}
@ -79,12 +80,12 @@ class CreateTicket extends Component {
}
const body = {
firstName: state.firstName,
lastName: state.lastName,
email: state.email,
type: state.type,
subject: state.subject,
message: state.message
firstName: state.firstName,
lastName: state.lastName,
email: state.email,
type: state.type,
subject: state.subject,
message: state.message
}
fetch(`${config.baseURL}tickets`, {
@ -251,6 +252,9 @@ class CreateTicket extends Component {
<FormGroup>
<Button>Open Ticket</Button>
</FormGroup>
<Link to="/">
Back to home
</Link>
</Col>
</Row>
</Form>