[IMPROVE] fix typescript error “No overload matches this call” with some @ts-ignore for not changing the implementation

This commit is contained in:
AlexAlexandre 2021-07-16 16:31:28 -03:00
parent 19d8ab1a57
commit 66a4627fec
3 changed files with 4 additions and 3 deletions

View File

@ -65,6 +65,7 @@ class AvatarContainer extends React.Component<Partial<IAvatar>, any> {
if (this.mounted) {
this.setState({ avatarETag });
} else {
// @ts-ignore
this.state.avatarETag = avatarETag;
}
});

View File

@ -36,9 +36,8 @@ const BackgroundContainer = ({ theme, text, loading }: IBackgroundContainer) =>
<View style={styles.container}>
<ImageBackground source={{ uri: `message_empty_${ theme }` }} style={styles.image} />
{text ? <Text style={[styles.text, { color: themes[theme].auxiliaryTintColor }]}>{text}</Text> : null}
{/*{loading ? <ActivityIndicator style={[styles.text, { color: themes[theme].auxiliaryTintColor }]} /> : null}*/}
{loading ? <ActivityIndicator color={themes[theme].auxiliaryTintColor} style={styles.text} /> : null}
{/*@ts-ignore*/}
{loading ? <ActivityIndicator style={[styles.text, { color: themes[theme].auxiliaryTintColor }]} /> : null}
</View>
);

View File

@ -54,6 +54,7 @@ class EmojiCategory extends React.Component<IEmoji> {
const marginHorizontal = (width - (numColumns * EMOJI_SIZE)) / 2;
return (
// @ts-ignore
<FlatList
contentContainerStyle={{ marginHorizontal }}
// rerender FlatList in case of width changes