Skip to content

Commit

Permalink
fix(ui): Use web hash history in ui (fix vitest-dev#3481) (vitest-dev…
Browse files Browse the repository at this point in the history
…#3487)

Co-authored-by: Vladimir <[email protected]>
  • Loading branch information
2 people authored and LorenzoBloedow committed Dec 19, 2023
1 parent 88cf805 commit 50dba9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ui/client/composables/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export interface Params {
view: null | 'graph' | 'editor' | 'console'
}

export const params = useUrlSearchParams<Params>('hash-params', {
export const params = useUrlSearchParams<Params>('hash', {
initialValue: {
file: '',
view: null,
Expand Down
5 changes: 2 additions & 3 deletions packages/ui/client/global-setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="vite-plugin-pages/client" />

import { createRouter as _createRouter, createWebHistory } from 'vue-router'
import { createRouter as _createRouter, createWebHashHistory } from 'vue-router'
import FloatingVue, { VTooltip } from 'floating-vue'
import routes from 'virtual:generated-pages'
import 'd3-graph-controller/default.css'
Expand All @@ -11,7 +11,6 @@ import 'codemirror-theme-vars/base.css'
import './styles/main.css'
import 'floating-vue/dist/style.css'
import 'uno.css'
import { BASE_PATH } from './constants'

export const directives = {
tooltip: VTooltip,
Expand All @@ -22,7 +21,7 @@ FloatingVue.options.distance = 10

export function createRouter() {
return _createRouter({
history: createWebHistory(BASE_PATH),
history: createWebHashHistory(),
routes,
})
}
Expand Down

0 comments on commit 50dba9f

Please sign in to comment.