Prettier 2.0 (#393)

This commit is contained in:
Steve Faulkner
2021-01-20 09:15:01 -06:00
committed by GitHub
parent c1937ca464
commit 4be53284b5
500 changed files with 41927 additions and 41838 deletions

View File

@@ -12,15 +12,15 @@ export async function fetchAccessData(portalToken: string): Promise<AccessInputM
const options = {
method: "GET",
headers: headers
headers: headers,
};
return (
fetch(url, options)
.then(response => response.json())
.then((response) => response.json())
// Portal encrypted token API quirk: The response is double JSON encoded
.then(json => JSON.parse(json))
.catch(error => console.error(error))
.then((json) => JSON.parse(json))
.catch((error) => console.error(error))
);
}
@@ -29,7 +29,7 @@ export function useTokenMetadata(token: string): AccessInputMetadata {
useEffect(() => {
if (token) {
fetchAccessData(token).then(response => setState(response));
fetchAccessData(token).then((response) => setState(response));
}
}, [token]);
return state;