-
- {{ user.current.value.providerUid }}
-
-
-
Login
+
@@ -43,21 +48,4 @@ export default {
},
};
-
-
```
diff --git a/src/routes/docs/tutorials/nuxt/step-7/+page.markdoc b/src/routes/docs/tutorials/nuxt/step-7/+page.markdoc
index 5408408bd5..2e58bf2fec 100644
--- a/src/routes/docs/tutorials/nuxt/step-7/+page.markdoc
+++ b/src/routes/docs/tutorials/nuxt/step-7/+page.markdoc
@@ -14,39 +14,64 @@ Overwrite the contents of `src/pages/index.vue` with the following:
```vue
-
- Submit Idea
-
-
+
+
+ Submit Idea
+
+
+
Please login to submit an idea.
-
- Latest Ideas
-
- -
-
- {{ idea.title }}
-
{{ idea.description }}
-
-
-
-
+
+
+ Latest Ideas
+
+ -
+
+
{{ idea.title }}
+
{{ idea.description }}
+
+
+
+
+
+
+
@@ -63,16 +88,21 @@ export default {
const addIdeaData = {
userId: user.current.value !== null ? user.current.value.userId : "",
- title: "",
- description: "",
+ title: ref(""),
+ description: ref(""),
};
const handleAddIdea = async () => {
- await ideas.add(addIdeaData);
- addIdeaData.title = "";
- addIdeaData.description = "";
+ if (!addIdeaData.title.length) return;
+ else {
+ await ideas.add(addIdeaData);
+ addIdeaData.title.value = "";
+ addIdeaData.description.value = "";
+ }
};
+ console.log(addIdeaData.description);
+
const handleRemoveIdea = async (id) => {
await ideas.remove(id);
};
@@ -88,30 +118,12 @@ export default {
};
-
+
```
The first section will now show a form for adding ideas if the user is logged in. The main section shows the 10 newest ideas from the Appwrite database.
diff --git a/src/routes/docs/tutorials/nuxt/step-8/+page.markdoc b/src/routes/docs/tutorials/nuxt/step-8/+page.markdoc
index c581b9edcf..b98f886f86 100644
--- a/src/routes/docs/tutorials/nuxt/step-8/+page.markdoc
+++ b/src/routes/docs/tutorials/nuxt/step-8/+page.markdoc
@@ -8,6 +8,3 @@ step: 8
# Test your project {% #test-project %}
Run your project with `npm run dev -- --open --port 3000` and open [http://localhost:3000](http://localhost:3000) in your browser.
Head to the [Appwrite Console](https://cloud.appwrite.io/console) to see the new users and follow their interactions.
-
-# Add layout {% #add-layout %}
-The layout can be modified to your preferences. Go to the [Nuxt official documentation](https://nuxt.com/docs/getting-started/styling#third-party-libraries-and-modules) if you want to know more.