diff options
author | HombreLaser <sebastian-440@live.com> | 2023-05-25 19:53:48 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-05-25 19:53:48 -0600 |
commit | a0318f76f40deaeba367badf18af6141325d29e9 (patch) | |
tree | a88432d82adad9d0acb234935f3b9c3ae9c30c54 /src/lib | |
parent | e8fa9bd7bba125a339f11876eb5ea99d0cd301b6 (diff) |
Añade redirecciones faltantes
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/redirect_to.ts | 6 |
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 |