You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/create-listing-component.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ const routes = [
24
24
]
25
25
```
26
26
27
-
The ":id" in the URL will tell the router to put id of the listing in the URL whenever it is navigated to. This will also allow us to send the id of that specific Listing to API for us to fetch.
27
+
The `:id` in the URL will tell the router to put the `id` of the listing in the URL whenever it is navigated to. This will also allow us to send the `id` of that specific Listing to API for us to fetch.
28
28
29
29
Next up create a `Listing.vue` file in the pages folder and add the following:
30
30
@@ -161,11 +161,9 @@ export default {
161
161
162
162
```
163
163
164
-
🌶️ Similar to the landing page wee have an Apollo Query Component that will allow us to fetch the data for the listing and gives variables for the data, error and loading states.
164
+
🌶️ Similar to the landing page we have an Apollo Query Component that will allow us to fetch the data for the listing and gives variables for the `data`, `error` and `loading` states.
165
165
166
-
🌶️ In our template slot we first check for the Loading state to be true. then render a loading state.
167
-
168
-
🌶️ Same thing for the error state
166
+
🌶️ In our template `slot` we first check for the Loading state to be true, then render a loading state.
169
167
170
168
🌶️ Then in the data part we are rending all the data associated with the Listing.
0 commit comments