Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Datlyfe committed Mar 2, 2022
1 parent 9e1298e commit 022be74
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,20 @@ export const authenticate = async (storybookToken: string) => {
};

export const getStorybookToken = () => {
debugger;
const params = new URLSearchParams(window.location.search);
const tokenFromUrl = params.get('anima_t');
const tokenFromUrl = params.get("anima_t");
if (tokenFromUrl) {
localStorage.setItem('anima_t', tokenFromUrl);
localStorage.setItem("anima_t", tokenFromUrl);
return tokenFromUrl;
}

const tokenFromLocalStorage = localStorage.getItem('anima_t');
const tokenFromLocalStorage = localStorage.getItem("anima_t");
if (tokenFromLocalStorage) {
return tokenFromLocalStorage;
}

return STORYBOOK_ANIMA_TOKEN;
}
};

export const createStoryRequest = async (
storybookToken: string,
Expand Down

0 comments on commit 022be74

Please sign in to comment.