From f6eb74736a3d955ec699bf717c8475096b85586e Mon Sep 17 00:00:00 2001 From: antoinechalifour Date: Thu, 3 Oct 2019 20:01:43 +0200 Subject: [PATCH] fix(App): ts ignore --- src/App/App.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/App/App.tsx b/src/App/App.tsx index 5439da2..65ac3e0 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -29,7 +29,7 @@ export interface AppStateInterface { scope: string; showLoginModal: boolean; isUserLoggedIn: boolean; - packages: []; + packages: any[]; isLoading: boolean; } export default class App extends Component<{}, AppStateInterface> { @@ -85,11 +85,9 @@ export default class App extends Component<{}, AppStateInterface> { public loadOnHandler = async () => { try { - // @ts-ignore - this.req = await API.request('packages', 'GET'); + const packages = await API.request('packages', 'GET'); this.setState({ - // @ts-ignore - packages: this.req, + packages, isLoading: false, }); } catch (error) { @@ -113,7 +111,6 @@ export default class App extends Component<{}, AppStateInterface> { */ public handleToggleLoginModal = () => { this.setState(prevState => ({ - // @ts-ignore showLoginModal: !prevState.showLoginModal, })); }; @@ -123,7 +120,6 @@ export default class App extends Component<{}, AppStateInterface> { * Required by:
*/ public handleDoLogin = async (usernameValue, passwordValue) => { - // @ts-ignore const { username, token, error } = await makeLogin(usernameValue, passwordValue); if (username && token) { @@ -184,7 +180,6 @@ export default class App extends Component<{}, AppStateInterface> { public renderHeader = (): ReactElement => { const { logoUrl, - // @ts-ignore user: { username }, scope, } = this.state;