Compare commits

...

2 Commits

Author SHA1 Message Date
605a293052 Updates 2023-05-30 17:40:38 -04:00
4d26396a8d Add util to handle redirects. version bump. 2023-05-27 10:37:46 -04:00
5 changed files with 5 additions and 5 deletions

View File

@@ -6,6 +6,5 @@
.yarnrc.yml .yarnrc.yml
babel.config.* babel.config.*
jest.config.* jest.config.*
src
tsconfig*.json tsconfig*.json
tslint.json tslint.json

View File

@@ -1,6 +1,6 @@
{ {
"name": "@mifi/ui-common", "name": "@mifi/ui-common",
"version": "1.0.1", "version": "1.0.2",
"author": "mifi (Mike Fitzpatrick)", "author": "mifi (Mike Fitzpatrick)",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

View File

@@ -1 +1 @@
export const responseJson = (response: Response) => response.json(); export const responseJson = (response: Response | undefined) => (response && response.json()) || {};

View File

@@ -0,0 +1 @@
export const responseRedirect = ({ location }: { location: string }) => (window.location.href = location);

View File

@@ -13,9 +13,9 @@
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitThis": true, "noImplicitThis": true,
"outDir": "lib/", "outDir": "lib/",
"removeComments": true, "removeComments": false,
"rootDirs": ["./", "src/"], "rootDirs": ["./", "src/"],
"sourceMap": false, "sourceMap": true,
"strict": true, "strict": true,
"strictNullChecks": true, "strictNullChecks": true,
"target": "es2017" "target": "es2017"