From 4d26396a8df6ba5e4884d3428281e0f206ba6fd2 Mon Sep 17 00:00:00 2001 From: mifi Date: Sat, 27 May 2023 10:37:46 -0400 Subject: [PATCH] Add util to handle redirects. version bump. --- package.json | 2 +- src/utils/responseRedirect.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/utils/responseRedirect.ts diff --git a/package.json b/package.json index d14aa4f..9880b83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mifi/ui-common", - "version": "1.0.1", + "version": "1.0.2", "author": "mifi (Mike Fitzpatrick)", "license": "MIT", "scripts": { diff --git a/src/utils/responseRedirect.ts b/src/utils/responseRedirect.ts new file mode 100644 index 0000000..f98be4a --- /dev/null +++ b/src/utils/responseRedirect.ts @@ -0,0 +1 @@ +export const responseRedirect = ({ location }: { location: string }) => (window.location.href = location);