Skip to content

Commit 19834ae

Browse files
Rahul AggarwalRahul Aggarwal
authored andcommitted
remove commented code
1 parent e4eb4ce commit 19834ae

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

src/pages/activities/RandomAnimeQuote.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,7 @@ export const RandomAnimeQuote = () => {
99
const generateQuote = async () => {
1010
try {
1111
setQuote(null);
12-
const res = await axios.get(
13-
"/api/v1/quotes/random"
14-
);
15-
console.log(res.data.data);
16-
// const res = {
17-
// status: "success",
18-
// data: {
19-
// content: "Whenever I counted on someone, I ended up getting hurt.",
20-
// anime: {
21-
// id: 2,
22-
// name: "Hanasaku Iroha",
23-
// },
24-
// character: {
25-
// id: 5,
26-
// name: "Ohana Matsumae",
27-
// },
28-
// },
29-
// };
12+
const res = await axios.get("/api/v1/quotes/random");
3013
setQuote(res.data.data);
3114
} catch (error) {
3215
console.log(error);
@@ -52,7 +35,12 @@ export const RandomAnimeQuote = () => {
5235
</div>
5336
</div>
5437
)}
55-
{error && <div className="rquote-content error">Too many requests have been sent to the API. Please try again after an hour.</div>}
38+
{error && (
39+
<div className="rquote-content error">
40+
Too many requests have been sent to the API. Please try again after an
41+
hour.
42+
</div>
43+
)}
5644
{!quote && !error && (
5745
<div className="spinner-wrapper">
5846
<div className="spinner"></div>

0 commit comments

Comments
 (0)