()
| 28 | })); |
| 29 | |
| 30 | const dictionaryApi = async () => { |
| 31 | try { |
| 32 | const data = await axios.get( |
| 33 | `https://api.dictionaryapi.dev/api/v2/entries/${category}/${word}` |
| 34 | ); |
| 35 | console.log(data); |
| 36 | setMeanings(data.data); |
| 37 | // console.log(meanings); |
| 38 | } catch (err) { |
| 39 | console.log(err); |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | useEffect(() => { |
| 44 | dictionaryApi(); |