Skip to content

Commit

Permalink
Merge pull request #346 from cstenglein/implement-suggestions
Browse files Browse the repository at this point in the history
implement suggestions from escapedcat
  • Loading branch information
cstenglein authored Jun 8, 2022
2 parents 57077d6 + 963228b commit fdd4950
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const App: FC = () => {
refresh(REFRESH_TIME(payload.expires));
}
})
.catch(() => {
// do nothing
.catch((e) => {
console.error("Error: token refresh failed with: ", e);
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/ConfirmModal/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MODAL_ROOT } from "../../../util/util";

export type Props = {
confirmText: string;
confirmEndpoint?: string; // TODO remove
confirmEndpoint?: string; // TODO #345 remove
onConfirm?: () => void;
onClose: () => void;
};
Expand Down
4 changes: 3 additions & 1 deletion src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export function checkPropsUndefined(props: object): boolean {
}

export function parseJwt(token: string): TokenPayload {
return JSON.parse(atob(token.split(".")[1]));
// 1st part is header, 2nd part is payload, 3rd is signature
const payload = token.split(".")[1];
return JSON.parse(atob(payload));
}

export function enableGutter(): void {
Expand Down

0 comments on commit fdd4950

Please sign in to comment.