mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: qwerty287 <qwerty287@posteo.de>
11 lines
237 B
TypeScript
11 lines
237 B
TypeScript
import { useRouter } from 'vue-router';
|
|
import type { RouteLocationRaw } from 'vue-router';
|
|
|
|
export function useRouteBack(to: RouteLocationRaw) {
|
|
const router = useRouter();
|
|
|
|
return async () => {
|
|
await router.replace(to);
|
|
};
|
|
}
|