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

fix: fixed the intermittent page 404 error #50

Merged
merged 4 commits into from
Jan 13, 2025
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: 0 additions & 16 deletions business-registry-dashboard/app/middleware/00.magic-link.global.ts

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions business-registry-dashboard/app/pages/[...slug].vue

This file was deleted.

3 changes: 3 additions & 0 deletions business-registry-dashboard/app/pages/account/[orgId].vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<script setup lang="ts">
definePageMeta({ order: 0 })
</script>
<template>
<NuxtLayout name="dashboard">
<DashboardContent />
Expand Down
4 changes: 2 additions & 2 deletions business-registry-dashboard/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineNuxtConfig({
},

routeRules: {
'/': { redirect: '/en-CA' }
'/en-CA': { redirect: '/' }
},

modules: [
Expand Down Expand Up @@ -88,7 +88,7 @@ export default defineNuxtConfig({
file: 'fr-CA.ts'
}
],
strategy: 'prefix',
strategy: 'prefix_except_default',
Copy link
Collaborator Author

@JazzarKarim JazzarKarim Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the main culprit. Basically, what this was doing, is add that prefix to everything. This messed up the routing and needed middleware and other stuff. Changing this now follows proper routing in such that "/account/3040" works for example directly without the need to process it using extra code.

lazy: true,
langDir: 'locales',
defaultLocale: 'en-CA',
Expand Down
2 changes: 1 addition & 1 deletion business-registry-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "business-registry-dashboard",
"private": true,
"type": "module",
"version": "0.0.18",
"version": "0.0.19",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down
Loading