feat: add pre commit hook to lint frontend & fix warnings
This commit is contained in:
committed by
Jordan Knott
parent
8ce19a1ceb
commit
46e724e731
@ -1,18 +1,13 @@
|
||||
import React, { useEffect, useContext } from 'react';
|
||||
import axios from 'axios';
|
||||
import Register from 'shared/components/Register';
|
||||
import { Container, LoginWrapper } from './Styles';
|
||||
import { useCreateUserAccountMutation, useMeQuery, MeDocument, MeQuery } from 'shared/generated/graphql';
|
||||
import { useHistory } from 'react-router';
|
||||
import { getAccessToken, setAccessToken } from 'shared/utils/accessToken';
|
||||
import updateApolloCache from 'shared/utils/cache';
|
||||
import produce from 'immer';
|
||||
import { useApolloClient } from '@apollo/react-hooks';
|
||||
import UserContext, { PermissionLevel, PermissionObjectType } from 'App/context';
|
||||
import UserContext from 'App/context';
|
||||
import jwtDecode from 'jwt-decode';
|
||||
import { Container, LoginWrapper } from './Styles';
|
||||
|
||||
const Install = () => {
|
||||
const client = useApolloClient();
|
||||
const history = useHistory();
|
||||
const { setUser } = useContext(UserContext);
|
||||
useEffect(() => {
|
||||
@ -63,7 +58,7 @@ const Install = () => {
|
||||
history.replace('/login');
|
||||
} else {
|
||||
const response: RefreshTokenResponse = await x.data;
|
||||
const { accessToken, isInstalled } = response;
|
||||
const { accessToken: newToken, isInstalled } = response;
|
||||
const claims: JWTToken = jwtDecode(accessToken);
|
||||
const currentUser = {
|
||||
id: claims.userId,
|
||||
|
Reference in New Issue
Block a user