mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-22 23:28: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() {
|
function defineJumpActions() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const { localePath } = useContext() as any
|
||||||
|
|
||||||
defineActionHandler("navigation.jump.rest", () => {
|
defineActionHandler("navigation.jump.rest", () => {
|
||||||
router.push({ path: "/" })
|
router.push({ path: localePath("/") })
|
||||||
})
|
})
|
||||||
defineActionHandler("navigation.jump.graphql", () => {
|
defineActionHandler("navigation.jump.graphql", () => {
|
||||||
router.push({ path: "/graphql" })
|
router.push({ path: localePath("/graphql") })
|
||||||
})
|
})
|
||||||
defineActionHandler("navigation.jump.realtime", () => {
|
defineActionHandler("navigation.jump.realtime", () => {
|
||||||
router.push({ path: "/realtime" })
|
router.push({ path: localePath("/realtime") })
|
||||||
})
|
})
|
||||||
defineActionHandler("navigation.jump.documentation", () => {
|
defineActionHandler("navigation.jump.documentation", () => {
|
||||||
router.push({ path: "/documentation" })
|
router.push({ path: localePath("/documentation") })
|
||||||
})
|
})
|
||||||
defineActionHandler("navigation.jump.settings", () => {
|
defineActionHandler("navigation.jump.settings", () => {
|
||||||
router.push({ path: "/settings" })
|
router.push({ path: localePath("/settings") })
|
||||||
})
|
})
|
||||||
defineActionHandler("navigation.jump.back", () => {
|
defineActionHandler("navigation.jump.back", () => {
|
||||||
router.go(-1)
|
router.go(-1)
|
||||||
|
Loading…
Reference in New Issue
Block a user