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

Commit

Permalink
fix(App): ts ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinechalifour committed Oct 6, 2019
1 parent 35d691c commit f6eb747
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -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<any[]>('packages', 'GET');
this.setState({
// @ts-ignore
packages: this.req,
packages,
isLoading: false,
});
} catch (error) {
Expand All @@ -113,7 +111,6 @@ export default class App extends Component<{}, AppStateInterface> {
*/
public handleToggleLoginModal = () => {
this.setState(prevState => ({
// @ts-ignore
showLoginModal: !prevState.showLoginModal,
}));
};
Expand All @@ -123,7 +120,6 @@ export default class App extends Component<{}, AppStateInterface> {
* Required by: <Header />
*/
public handleDoLogin = async (usernameValue, passwordValue) => {
// @ts-ignore
const { username, token, error } = await makeLogin(usernameValue, passwordValue);

if (username && token) {
Expand Down Expand Up @@ -184,7 +180,6 @@ export default class App extends Component<{}, AppStateInterface> {
public renderHeader = (): ReactElement<HTMLElement> => {
const {
logoUrl,
// @ts-ignore
user: { username },
scope,
} = this.state;
Expand Down

0 comments on commit f6eb747

Please sign in to comment.