Skip to content

Commit

Permalink
Pass props using spread operator
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbitt committed Nov 13, 2019
1 parent 1d2752d commit 7f9ca84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ function App(props) {
<header className="App-header">
<h1>Trace.moe</h1>
<h4>Trace the original anime from a screenshot.</h4>
<PaperDropzone props={props} />
<PaperDropzone {...props} />
<h2 style={{ color: "orange" }}>OR</h2>
<URLForm props={props}/>
<URLForm {...props}/>
<LoadingSpinnerComponent />
</header>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PaperDropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function PaperDropzone(props) {
trackPromise(
searchAnime(acceptedFiles).then(res => {
console.log(res);
props.props.history.push("/results", { results: res });
props.history.push("/results", { results: res });
})
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/URLForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class URLForm extends React.Component {
trackPromise(
searchAnimeWithURL(urlString).then(res => {
console.log(res);
this.props.props.history.push("/results", { results: res });
this.props.history.push("/results", { results: res });
})
);
};
Expand Down

0 comments on commit 7f9ca84

Please sign in to comment.