Skip to content

Commit

Permalink
#6 change app.vue in index.vue & use system route
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcellino-Palerme committed Oct 31, 2023
1 parent 97fdbf6 commit cd3eaca
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 2 additions & 5 deletions components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ref } from "vue";
import { string, object, email, minLength, Input } from "valibot";
import type { FormSubmitEvent } from "@nuxt/ui/dist/runtime/types";
// import createSession from "~/composables/createSession";
import { reloadNuxtApp, useCookie } from "nuxt/app";
import {useCookie } from "nuxt/app";
console.log("a");
Expand Down Expand Up @@ -55,10 +55,7 @@ async function submit (event: FormSubmitEvent<Schema>) {
});
}
reloadNuxtApp();
console.log("aller");
window.location.reload();
}
console.log("e");
Expand Down
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export default defineNuxtConfig({
],
colorMode: {
preference: "light"
}
},
pages:true
});
8 changes: 4 additions & 4 deletions app.vue → pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
-->

<script setup lang="ts">
import banner from "./components/BannerMain.vue";
import extras from "./components/ExtrasNav.vue";
import extract from "./components/ExtractInfo.vue";
import login from "./components/LoginForm.vue";
import banner from "~/components/BannerMain.vue";
import extras from "~/components/ExtrasNav.vue";
import extract from "~/components/ExtractInfo.vue";
import login from "~/components/LoginForm.vue";
import { useCookie } from "nuxt/app";

</script>
Expand Down
6 changes: 6 additions & 0 deletions pages/profile.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
<!-- This page correctly has only one single root element -->
Page content
</div>
</template>

0 comments on commit cd3eaca

Please sign in to comment.