From a0318f76f40deaeba367badf18af6141325d29e9 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 25 May 2023 19:53:48 -0600 Subject: AƱade redirecciones faltantes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/redirect_to.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/lib/redirect_to.ts (limited to 'src/lib') diff --git a/src/lib/redirect_to.ts b/src/lib/redirect_to.ts new file mode 100644 index 0000000..e31e235 --- /dev/null +++ b/src/lib/redirect_to.ts @@ -0,0 +1,6 @@ +export default function redirectTo(route: string) { + const split_location = window.location.href.split('/') + const hostname = split_location.slice(0, split_location.length - 1).join('/'); + + window.location.href = hostname + route; +} \ No newline at end of file -- cgit v1.2.3