Skip to content

Commit

Permalink
declare routes
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Apr 11, 2024
1 parent b526842 commit 0e94fa5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/userpage/heading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useSession } from '~/store/session'
import userpageStore from '~/store/userpage'
const page = userpageStore()
const route = useRoute()
const route = useRoute<'user-handle'>()
const { t, locale } = useI18n()
const app$ = useNuxtApp()
const session = useSession()
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ definePageMeta({
layout: 'centered',
})
const route = useRoute()
const route = useRoute<'auth-login'>()
const app = useNuxtApp()
const { t } = useI18n()
Expand Down
2 changes: 1 addition & 1 deletion src/pages/beatmap/[id].server.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts" async>
// TODO https://github.com/victorgarciaesgi/nuxt-typed-router/issues/110
const { id } = useRoute().params as { id: string | string[] }
const { id } = useRoute<'beatmap-id.server'>().params
const { t } = useI18n()
if (!id || Array.isArray(id)) {
throw createError(t('err-id-invalid'))
Expand Down
2 changes: 1 addition & 1 deletion src/pages/me/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const enum UploadingAvatarStatus {
}
const app$ = useNuxtApp()
const route = useRoute()
const route = useRoute<'me-settings'>()
const { t, locale } = useI18n()
const session = useSession()
const dyn = await useDynamicSettings()
Expand Down

0 comments on commit 0e94fa5

Please sign in to comment.