diff --git a/pages/about/[aboutDetailsId].vue b/pages/about/[aboutDetailsId].vue
index d4be84ff..5f594d7d 100644
--- a/pages/about/[aboutDetailsId].vue
+++ b/pages/about/[aboutDetailsId].vue
@@ -88,7 +88,8 @@ export default {
return await $contentfulClient.getEntry(params.aboutDetailsId).then(async (response) => {
const slug = pathOr("", ['fields', 'slug'], response)
if (!isEmpty(slug)) {
- await navigateTo(`/about/${slug}`)
+ const router = useRouter()
+ await router.replace({ path: `/about/${slug}` })
}
return response
})
diff --git a/pages/about/get-involved/[id].vue b/pages/about/get-involved/[id].vue
index 0a10c98c..0e64810c 100644
--- a/pages/about/get-involved/[id].vue
+++ b/pages/about/get-involved/[id].vue
@@ -3,7 +3,8 @@ export default {
async setup() {
const route = useRoute()
const newPath = route.href.replace('/about/get-involved', '/about')
- await navigateTo(newPath, { redirectCode: 301 })
+ const router = useRouter()
+ await router.replace({ path: newPath })
}
}
diff --git a/pages/about/sparc-portal/metrics/index.vue b/pages/about/sparc-portal/metrics/index.vue
index bf2ad234..6d95863b 100644
--- a/pages/about/sparc-portal/metrics/index.vue
+++ b/pages/about/sparc-portal/metrics/index.vue
@@ -3,7 +3,8 @@ export default {
name: 'MetricsPage',
async setup() {
- await navigateTo("/about/metrics", { redirectCode: 301 })
+ const router = useRouter()
+ await router.replace({ path: "/about/metrics" })
},
}
diff --git a/pages/about/team-and-leadership/[id].vue b/pages/about/team-and-leadership/[id].vue
index 3103d898..e4b7aebe 100644
--- a/pages/about/team-and-leadership/[id].vue
+++ b/pages/about/team-and-leadership/[id].vue
@@ -3,7 +3,8 @@ export default {
async setup() {
const route = useRoute()
const newPath = route.href.replace('/about/team-and-leadership', '/about')
- await navigateTo(newPath, { redirectCode: 301 })
+ const router = useRouter()
+ await router.replace({ path: newPath })
}
}
diff --git a/pages/about/what-we-offer/[id].vue b/pages/about/what-we-offer/[id].vue
index 69def0f0..d087f20c 100644
--- a/pages/about/what-we-offer/[id].vue
+++ b/pages/about/what-we-offer/[id].vue
@@ -3,7 +3,8 @@ export default {
async setup() {
const route = useRoute()
const newPath = route.href.replace('/about/what-we-offer', '/about')
- await navigateTo(newPath, { redirectCode: 301 })
+ const router = useRouter()
+ await router.replace({ path: newPath })
}
}
diff --git a/pages/data/index.vue b/pages/data/index.vue
index 1353c677..e79093c6 100644
--- a/pages/data/index.vue
+++ b/pages/data/index.vue
@@ -170,7 +170,8 @@ export default {
if (focusQuery) {
newPath += `&selectedProjectsAnatomicalFocusIds=${focusQuery}`
}
- return navigateTo(newPath)
+ const router = useRouter()
+ await router.replace({ path: newPath })
}
const { $algoliaClient } = useNuxtApp()
const algoliaSortOptions = [
diff --git a/pages/maps/index.vue b/pages/maps/index.vue
index 92ac1ba9..1469a475 100644
--- a/pages/maps/index.vue
+++ b/pages/maps/index.vue
@@ -2,17 +2,18 @@
import { pathOr, isEmpty } from 'ramda'
import { infoMessage } from '@/utils/notification-messages'
export default {
- async setup() {
+ setup() {
const route = useRoute()
- const emptyParam = pathOr('', ['query'], route)
+ const query = pathOr('', ['query'], route)
let newPath = ''
- if (isEmpty(emptyParam)) {
+ if (isEmpty(query)) {
newPath = route.href.replace('/maps', '/apps')
infoMessage('All available map viewers have now been integrated with SPARC Apps and can be found below!')
} else {
- newPath = route.href.replace('/maps', '/apps/maps')
+ newPath = route.href.replace('/maps', `/apps/maps?${query}`)
}
- await navigateTo(newPath, { redirectCode: 301 })
+ const router = useRouter()
+ router.replace({ path: newPath, query: query })
}
}
diff --git a/pages/news-and-events/community-spotlight/submit/index.vue b/pages/news-and-events/community-spotlight/submit/index.vue
index 454f856a..faa0ed45 100644
--- a/pages/news-and-events/community-spotlight/submit/index.vue
+++ b/pages/news-and-events/community-spotlight/submit/index.vue
@@ -1,7 +1,8 @@
diff --git a/pages/news-and-events/community-spotlight/success-stories/index.vue b/pages/news-and-events/community-spotlight/success-stories/index.vue
index 3bf43ed6..07562441 100644
--- a/pages/news-and-events/community-spotlight/success-stories/index.vue
+++ b/pages/news-and-events/community-spotlight/success-stories/index.vue
@@ -1,7 +1,8 @@
\ No newline at end of file
+
diff --git a/pages/news-and-events/submit/index.vue b/pages/news-and-events/submit/index.vue
index 454f856a..faa0ed45 100644
--- a/pages/news-and-events/submit/index.vue
+++ b/pages/news-and-events/submit/index.vue
@@ -1,7 +1,8 @@
diff --git a/pages/projects/[projectId].vue b/pages/projects/[projectId].vue
index 9d7a3159..cf274078 100644
--- a/pages/projects/[projectId].vue
+++ b/pages/projects/[projectId].vue
@@ -2,8 +2,9 @@
export default {
async setup() {
const route = useRoute()
+ const router = useRouter()
const newPath = route.href.replace('/projects', '/about/projects')
- await navigateTo(newPath, { redirectCode: 301 })
+ await router.replace({ path: newPath })
},
}
diff --git a/pages/resources/[resourceId].vue b/pages/resources/[resourceId].vue
index 1d6e57a1..97751a57 100644
--- a/pages/resources/[resourceId].vue
+++ b/pages/resources/[resourceId].vue
@@ -2,8 +2,9 @@
export default {
async setup() {
const route = useRoute()
+ const router = useRouter()
const newPath = route.href.replace('/resources/', '/tools-and-resources/')
- await navigateTo(newPath, { redirectCode: 301 })
+ await router.replace({ path: newPath })
},
}