mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-16 05:26:31 +00:00
10 lines
203 B
TypeScript
10 lines
203 B
TypeScript
|
import { RouteLocationRaw, useRouter } from 'vue-router';
|
||
|
|
||
|
export function useRouteBack(to: RouteLocationRaw) {
|
||
|
const router = useRouter();
|
||
|
|
||
|
return async () => {
|
||
|
await router.replace(to);
|
||
|
};
|
||
|
}
|