Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

hotfix: naming #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Music Akinator</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
10 changes: 5 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SpinnerCard from "./Components/SpinnerCard";

const searchOptions = [
{ value: "lyrics", label: "Lyrics" },
{ value: "humming", label: "Humming" }
{ value: "recognizer", label: "Song Recognize" }
];

const useStyles = makeStyles({
Expand Down Expand Up @@ -47,10 +47,10 @@ function App() {
}
};

const handleHummingSend = async humming => {
const handleSongRecognizeSend = async sample => {
setPending(true);
const formData = new FormData();
formData.append("file", humming);
formData.append("file", sample);

const response = await fetch(
`${process.env.REACT_APP_BACKEND_URL}/recognizeByHumming`,
Expand Down Expand Up @@ -102,11 +102,11 @@ function App() {
<LyricsCard onSubmit={handleLyricsSend} />
</TabPanel>
<TabPanel
value="humming"
value="recognizer"
className={classes.tabPanel}
currentValue={searchMethod}
>
<AudioRecoder onSubmit={handleHummingSend} />
<AudioRecoder onSubmit={handleSongRecognizeSend} />
</TabPanel>
<SpinnerCard loading={pending} />
{deezerId && !pending && step !== "win" && step !== "lost" && (
Expand Down