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
What would be a good way to conditionally render a page in another page, for instance, at the pages/account.vue, is there a way to render pages/login.vue if a user is not logged in, or render the pages/my-account.vue page if the user is logged in within the pages/account.vue path?
The way I would do this is at the /account path, if a user is logged in just render a <MyAccount /> component or a <Login /> component conditionally, but I wanted to know if there would be a way to do this using an existing page.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What would be a good way to conditionally render a page in another page, for instance, at the
pages/account.vue
, is there a way to renderpages/login.vue
if a user is not logged in, or render thepages/my-account.vue
page if the user is logged in within thepages/account.vue
path?The way I would do this is at the
/account
path, if a user is logged in just render a<MyAccount />
component or a<Login />
component conditionally, but I wanted to know if there would be a way to do this using an existing page.Beta Was this translation helpful? Give feedback.
All reactions