File tree Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments