Commit 3c26d308 by Aman Sharma

added button

parent 00d53327
......@@ -58,6 +58,12 @@ class NewRecipe extends React.Component {
.then(response => this.props.history.push(`/recipe/${response.id}`))
.catch(error => console.log(error.message));
}
fileUpload (event) {
console.log(event);
console.log('event');
}
render() {
return (
<div className="container mt-5">
......@@ -66,6 +72,8 @@ class NewRecipe extends React.Component {
<h1 className="font-weight-normal mb-5">
Add a new recipe to our awesome recipe collection.
</h1>
<input onChange={this.fileUpload} type="file" accept=".xml"></input>
<p> Upload a file or </p>
<form onSubmit={this.onSubmit}>
<div className="form-group">
<label htmlFor="recipeName">Recipe name</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment