Skip to content

Commit

Permalink
refactor(router): page files paths architecture
Browse files Browse the repository at this point in the history
Took 11 minutes
  • Loading branch information
Croos3r committed May 18, 2024
1 parent b9538b3 commit eb8dd83
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/pages/CompanyPage.vue → src/pages/Company/index.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<template>
<p>Company page content</p>
</template>;
<script lang="ts" setup>
</script>
3 changes: 2 additions & 1 deletion src/pages/DesignPage.vue → src/pages/Design/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts"></script>;
<script lang="ts" setup>
</script>;

<template>
<div class="container mx-auto px-5 w-full text-center flex flex-col space-y-2.5">
Expand Down
File renamed without changes.
23 changes: 16 additions & 7 deletions src/router.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import { createRouter, createWebHistory } from "vue-router";

import HomePage from "./pages/HomePage.vue";
import CompanyPage from "./pages/CompanyPage.vue";
import DesignPage from "./pages/DesignPage.vue";
import Home from "./pages/Home/index.vue";
import Company from "./pages/Company/index.vue";
import Design from "./pages/Design/index.vue";

const routes = [
{ path: "/", component: HomePage },
{ path: "/company", component: CompanyPage },
{ path: "/design", component: DesignPage },
{
path: "/",
component: Home
},
{
path: "/company",
component: Company
},
{
path: "/design",
component: Design
}
];

export const router = createRouter({
history: createWebHistory(),
routes,
routes
});

0 comments on commit eb8dd83

Please sign in to comment.