Update src/routes/docs/tutorials/nuxt/step-7/+page.markdoc

Co-authored-by: Vincent (Wen Yu) Ge <wenyu1999@hotmail.com>
This commit is contained in:
evelinabe
2023-10-31 08:26:21 +01:00
committed by GitHub
parent 87e00fdefc
commit f58e0e2bca

View File

@@ -88,7 +88,7 @@ From the `components` directory, add the file `ÌdeasForm.vue` and add the follo
Next, add the component to the page `pages/index.vue` by auto-importing it in the `<template>`tag.
In doing that, we need to take a moment to think of how we want to display the form to our.
Since it should only be shown to logged in user, we need to wrap it in a `<section>`that renders conditionally when the `isLoggedIn` reference in the `useUserSession` is true.
Since it should only be shown to a logged in user, we need to wrap it in a `<section>` that renders conditionally when the `isLoggedIn` reference in the `useUserSession` is true.
If the requirement is not met, we show a paragraph with some information to the user instead.
Add the following code to the `index.vue`page to conditionally render the form and information paragraph.