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">
......@@ -65,7 +71,9 @@ class NewRecipe extends React.Component {
<div className="col-sm-12 col-lg-6 offset-lg-3">
<h1 className="font-weight-normal mb-5">
Add a new recipe to our awesome recipe collection.
</h1>
</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