Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router TypeScript #497

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions frontend/src/router.js → frontend/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineAsyncComponent } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import { RouteRecordRaw, createRouter, createWebHistory } from 'vue-router';
import BookingView from '@/views/BookingView.vue';
import BookingConfirmationView from '@/views/BookingConfirmationView.vue';
import CalendarView from '@/views/CalendarView.vue';
Expand All @@ -9,19 +9,19 @@ import LoginView from '@/views/LoginView.vue';
import PostLoginView from '@/views/PostLoginView.vue';

// lazy loaded components
const ContactView = defineAsyncComponent(() => import('@/views/ContactView'));
const AppointmentsView = defineAsyncComponent(() => import('@/views/AppointmentsView'));
const SettingsView = defineAsyncComponent(() => import('@/views/SettingsView'));
const ProfileView = defineAsyncComponent(() => import('@/views/ProfileView'));
const LegalView = defineAsyncComponent(() => import('@/views/LegalView'));
const SubscriberPanelView = defineAsyncComponent(() => import('@/views/admin/SubscriberPanelView'));
const ContactView = defineAsyncComponent(() => import('@/views/ContactView.vue'));
const AppointmentsView = defineAsyncComponent(() => import('@/views/AppointmentsView.vue'));
const SettingsView = defineAsyncComponent(() => import('@/views/SettingsView.vue'));
const ProfileView = defineAsyncComponent(() => import('@/views/ProfileView.vue'));
const LegalView = defineAsyncComponent(() => import('@/views/LegalView.vue'));
const SubscriberPanelView = defineAsyncComponent(() => import('@/views/admin/SubscriberPanelView.vue'));
const InviteCodePanelView = defineAsyncComponent(() => import('@/views/admin/InviteCodePanelView.vue'));

/**
* Defined routes for Thunderbird Appointment
* Note: All routes require authentication unless otherwise specified in App.vue::routeIsPublic
*/
const routes = [
const routes: RouteRecordRaw[] = [
// instant loaded routes
{
path: '/',
Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
extensions: ['.js', '.vue'],
extensions: ['.ts', '.js', '.vue'],
},

server: {
Expand Down