Skip to content

Commit f73f01c

Browse files
committed
fixed api-endpoint based on the given application
1 parent 2e4c551 commit f73f01c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/content/7/en/part7b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ If no country is found, a message is displayed to the user:
424424

425425
The application is otherwise complete, but in this exercise, you have to implement a custom hook _useCountry_, which can be used to search for the details of the country given to the hook as a parameter.
426426

427-
Use the API endpoint [full name](https://restcountries.com/#api-endpoints-v3-full-name) to fetch a country's details in a _useEffect_ hook within your custom hook.
427+
Use the API endpoint [full name](https://restcountries.com/#api-endpoints-v2-full-name) to fetch a country's details in a _useEffect_ hook within your custom hook.
428428

429429
Note that in this exercise it is essential to use useEffect's [second parameter](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect) array to control when the effect function is executed. See the course [part 2](/en/part2/adding_styles_to_react_app#couple-of-important-remarks) for more info how the second parameter could be used.
430430

src/content/7/es/part7b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ Si no se encuentra el país, se muestra un mensaje al usuario
432432

433433
Por lo demás, la aplicación está completa, pero en este ejercicio debe implementar un hook personalizado _useCountry_, que se puede usar para buscar los detalles del país dado al hook como parámetro.
434434

435-
Use el endpoint [full name](https://restcountries.com/#api-endpoints-full-name) de la api para obtener los detalles del país en un hook _useEffect_ dentro de su hook personalizado.
435+
Use el endpoint [full name](https://restcountries.com/#api-endpoints-v2-full-name) de la api para obtener los detalles del país en un hook _useEffect_ dentro de su hook personalizado.
436436

437437
Tenga en cuenta que en este ejercicio es esencial utilizar el [segundo parámetro](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect) de useEffect para controlar cuándo se ejecuta la función de efecto.
438438

src/content/7/fi/osa7b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ Jos maata ei löydy, kerrotaan siitä käyttäjälle:
408408

409409
Sovellus on muuten valmiiksi toteutettu, mutta joudut tässä tehtävässä toteuttamaan custom hookin _useCountry_, jonka avulla haet hookin parametrina saaman maan tiedot.
410410

411-
Maan tietojen hakeminen kannattaa hoitaa API:n endpointin [full name](https://restcountries.com/#api-endpoints-v3-full-name) avulla ja hookin sisällä olevassa _useEffect_-hookissa.
411+
Maan tietojen hakeminen kannattaa hoitaa API:n endpointin [full name](https://restcountries.com/#api-endpoints-v2-full-name) avulla ja hookin sisällä olevassa _useEffect_-hookissa.
412412

413413
Huomaa, että tässä tehtävässä on oleellista hyödyntää useEffectin [toisena parametrina](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect) olevaa taulukkoa. Taulukolla kontrolloidaan, milloin efektifunktio kannattaa suorittaa. Kurssin [osassa 2](/osa2/tyylien_lisaaminen_react_sovellukseen#muutama-tarkea-huomio) on käyty läpi toisen parametrin käytön periaatteita.
414414

src/content/7/zh/part7b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ const App = () => {
483483
该应用在其他方面是完整的,但在这个练习中,你必须实现一个自定义钩子_useCountry_,它可以用来搜索作为参数给钩子的国家的细节。
484484

485485
<!-- Use the api endpoint [full name](https://restcountries.com/#api-endpoints-v3-full-name) to fetch a country's details in a _useEffect_ hook within your custom hook.-->
486-
使用api端点[全名](https://restcountries.com/#api-endpoints-v3-full-name)在你的自定义钩子的_useEffect_钩子中获取一个国家的详细信息。
486+
使用api端点[全名](https://restcountries.com/#api-endpoints-v2-full-name)在你的自定义钩子的_useEffect_钩子中获取一个国家的详细信息。
487487

488488
<!-- Note that in this exercise it is essential to use useEffect's [second parameter](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect) array to control when the effect function is executed.-->
489489
注意在这个练习中,使用useEffect's [第二个参数](https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect)数组来控制效果函数的执行时间是很重要的。

0 commit comments

Comments
 (0)