Skip to content

Commit

Permalink
fix: redirect rmrk2 prefix to ksm
Browse files Browse the repository at this point in the history
  • Loading branch information
preschian committed May 11, 2023
1 parent 108cdf2 commit c907ea7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions middleware/redirects.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default function ({ store, redirect, route }): void {
const prefix = store.getters.currentUrlPrefix

if (route.path.startsWith(`/${prefix}`)) {
if (route.path.endsWith('collections')) {
return redirect(`/${prefix}/explore/collectibles`)
Expand All @@ -8,4 +9,8 @@ export default function ({ store, redirect, route }): void {
return redirect(`/${prefix}/explore/items`)
}
}

if (route.path.includes('/rmrk2/')) {
return redirect(route.path.replace('/rmrk2/', '/ksm/'))
}
}

0 comments on commit c907ea7

Please sign in to comment.