mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-22 15:18:35 +00:00
fix: respect localePath on router - fixed #1859
This commit is contained in:
parent
3604d69463
commit
5772117dc8
@ -108,21 +108,22 @@ function updateThemes() {
|
||||
|
||||
function defineJumpActions() {
|
||||
const router = useRouter()
|
||||
const { localePath } = useContext() as any
|
||||
|
||||
defineActionHandler("navigation.jump.rest", () => {
|
||||
router.push({ path: "/" })
|
||||
router.push({ path: localePath("/") })
|
||||
})
|
||||
defineActionHandler("navigation.jump.graphql", () => {
|
||||
router.push({ path: "/graphql" })
|
||||
router.push({ path: localePath("/graphql") })
|
||||
})
|
||||
defineActionHandler("navigation.jump.realtime", () => {
|
||||
router.push({ path: "/realtime" })
|
||||
router.push({ path: localePath("/realtime") })
|
||||
})
|
||||
defineActionHandler("navigation.jump.documentation", () => {
|
||||
router.push({ path: "/documentation" })
|
||||
router.push({ path: localePath("/documentation") })
|
||||
})
|
||||
defineActionHandler("navigation.jump.settings", () => {
|
||||
router.push({ path: "/settings" })
|
||||
router.push({ path: localePath("/settings") })
|
||||
})
|
||||
defineActionHandler("navigation.jump.back", () => {
|
||||
router.go(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user