MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / useRouterParams

Function useRouterParams

frontend/src/hooks/useRouterParams.ts:4–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { useRoute } from "vue-router";
3
4export function useRouterParams() {
5 const route = useRoute();
6 if (!route) {
7 throw new Error(
8 "Failed to get Vue-Router! Please check if the Hook call source is in the Vue component."
9 );
10 }
11 const currentRoutePath = computed(() => route.path);
12 return {
13 currentRoutePath
14 };
15}

Callers 1

useLayoutConfig.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected