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

Commit f6eb747

Browse files
fix(App): ts ignore
1 parent 35d691c commit f6eb747

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/App/App.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface AppStateInterface {
2929
scope: string;
3030
showLoginModal: boolean;
3131
isUserLoggedIn: boolean;
32-
packages: [];
32+
packages: any[];
3333
isLoading: boolean;
3434
}
3535
export default class App extends Component<{}, AppStateInterface> {
@@ -85,11 +85,9 @@ export default class App extends Component<{}, AppStateInterface> {
8585

8686
public loadOnHandler = async () => {
8787
try {
88-
// @ts-ignore
89-
this.req = await API.request('packages', 'GET');
88+
const packages = await API.request<any[]>('packages', 'GET');
9089
this.setState({
91-
// @ts-ignore
92-
packages: this.req,
90+
packages,
9391
isLoading: false,
9492
});
9593
} catch (error) {
@@ -113,7 +111,6 @@ export default class App extends Component<{}, AppStateInterface> {
113111
*/
114112
public handleToggleLoginModal = () => {
115113
this.setState(prevState => ({
116-
// @ts-ignore
117114
showLoginModal: !prevState.showLoginModal,
118115
}));
119116
};
@@ -123,7 +120,6 @@ export default class App extends Component<{}, AppStateInterface> {
123120
* Required by: <Header />
124121
*/
125122
public handleDoLogin = async (usernameValue, passwordValue) => {
126-
// @ts-ignore
127123
const { username, token, error } = await makeLogin(usernameValue, passwordValue);
128124

129125
if (username && token) {
@@ -184,7 +180,6 @@ export default class App extends Component<{}, AppStateInterface> {
184180
public renderHeader = (): ReactElement<HTMLElement> => {
185181
const {
186182
logoUrl,
187-
// @ts-ignore
188183
user: { username },
189184
scope,
190185
} = this.state;

0 commit comments

Comments
 (0)