From ab6d29ec8100be177508af1b04a2bfac14d23452 Mon Sep 17 00:00:00 2001 From: regchiu Date: Fri, 13 Oct 2023 17:20:28 +0800 Subject: [PATCH] fix: url description for image of react.md --- runtime/manual/node/how_to_with_npm/react.md | 8 +++++--- runtime/tutorials/how_to_with_npm/react.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/manual/node/how_to_with_npm/react.md b/runtime/manual/node/how_to_with_npm/react.md index 45d8a4568..8e0a0affd 100644 --- a/runtime/manual/node/how_to_with_npm/react.md +++ b/runtime/manual/node/how_to_with_npm/react.md @@ -61,10 +61,12 @@ router }) .get("/api/:dinosaur", (context) => { if (context?.params?.dinosaur) { - const found = data.find(item => item.name.toLowerCase() === context.params.dinosaur.toLowerCase()); + const found = data.find((item) => + item.name.toLowerCase() === context.params.dinosaur.toLowerCase() + ); if (found) { context.response.body = found; - } else { + } else { context.response.body = "No dinosaurs found."; } } @@ -85,7 +87,7 @@ will return dinosaur information based on the route. Let's start the API server: deno run --allow-env --allow-net api/main.ts ``` -If we go to `localhost:8000/api`, we see: +If we go to `localhost:8000`, we see: ![json response of dinosaurs](../../images/how-to/react/dinosaur-api.png) diff --git a/runtime/tutorials/how_to_with_npm/react.md b/runtime/tutorials/how_to_with_npm/react.md index cf41c476b..8693694f9 100644 --- a/runtime/tutorials/how_to_with_npm/react.md +++ b/runtime/tutorials/how_to_with_npm/react.md @@ -87,7 +87,7 @@ will return dinosaur information based on the route. Let's start the API server: deno run --allow-env --allow-net api/main.ts ``` -If we go to `localhost:8000/api`, we see: +If we go to `localhost:8000`, we see: ![json response of dinosaurs](../../manual/images/how-to/react/dinosaur-api.png)