Skip to content

Commit

Permalink
[FIXING] Fixing the error from typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
JustalK committed Jan 7, 2021
1 parent 1fab93d commit 94f8891
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { AppStates } from 'src/interfaces/App';
import { library } from '@fortawesome/fontawesome-svg-core';
// Save all the icon from font-awesome for dynamic import
import * as Icons from '@fortawesome/free-solid-svg-icons';
import { IconProp } from '@fortawesome/fontawesome-svg-core';

const iconList = Object.keys(Icons)
.filter((key: string) => key !== 'fas' && key !== 'prefix')
// @ts-ignore: I dont find the definition for all the IconName pass to the Icon
.map((icon) => Icons[icon]);

library.add(...iconList);
Expand Down
1 change: 1 addition & 0 deletions src/components/CustomTopButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default class CustomTopButton extends Component<CustomTopButtonProps, Cus


onPress(callback: string, hasBeenPressed: string) {
// @ts-ignore: The callback is on too many file
this.props[callback]();
this.setState({[hasBeenPressed]: false});
}
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/Topic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { IconProp } from '@fortawesome/fontawesome-svg-core';

export interface TopicProps {
id: string;
name: string;
icon: string;
icon: IconProp;
source: string;
}

Expand Down

0 comments on commit 94f8891

Please sign in to comment.