summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-05-25 19:53:48 -0600
committerHombreLaser <sebastian-440@live.com>2023-05-25 19:53:48 -0600
commita0318f76f40deaeba367badf18af6141325d29e9 (patch)
treea88432d82adad9d0acb234935f3b9c3ae9c30c54 /src/lib
parente8fa9bd7bba125a339f11876eb5ea99d0cd301b6 (diff)
Añade redirecciones faltantes
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/redirect_to.ts6
1 files changed, 6 insertions, 0 deletions
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