1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-28 00:44:30 +07:00

fix(App): ts ignore

This commit is contained in:
antoinechalifour 2019-10-03 20:01:43 +02:00
parent 35d691c1e0
commit f6eb74736a

View File

@ -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<any[]>('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: <Header />
*/
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<HTMLElement> => {
const {
logoUrl,
// @ts-ignore
user: { username },
scope,
} = this.state;