feat: use shared composable for useProject and useTabs

Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
mertmit
2023-02-13 01:55:03 +03:00
parent 9f153d299e
commit 8045ba6779
8 changed files with 36 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
import type { MaybeRef } from '@vueuse/core'
import { computed, unref, useRoute } from '#imports'
import { computed, unref, useRouter } from '#imports'
export interface CellUrlOptions {
behavior?: string
@@ -21,7 +21,9 @@ const parseUrlRules = (serialized?: string): ParsedRules[] | undefined => {
}
export function useCellUrlConfig(url?: MaybeRef<string>) {
const route = useRoute()
const router = useRouter()
const route = $(router.currentRoute)
const config = $computed(() => ({
behavior: route.query.url_behavior as string | undefined,