mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 00:46:27 +03:00
lint
This commit is contained in:
parent
269d3fb93a
commit
ef9756cb2f
@ -25,16 +25,8 @@ class ContainerHeaderView extends PureComponent {
|
||||
// Component Functions
|
||||
|
||||
render() {
|
||||
const {
|
||||
color,
|
||||
defaultTitle,
|
||||
fontSize,
|
||||
hasSeperator,
|
||||
iconName,
|
||||
isBoldTitle,
|
||||
title,
|
||||
isCenter,
|
||||
} = this.props;
|
||||
const { color, defaultTitle, fontSize, hasSeperator, iconName, isBoldTitle, title, isCenter } =
|
||||
this.props;
|
||||
|
||||
return (
|
||||
<View style={[styles.wrapper, hasSeperator && styles.hasTopBorder]}>
|
||||
|
@ -80,7 +80,6 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
|
||||
hideTimeoutRef.current = setTimeout(() => {
|
||||
hide();
|
||||
}, duration);
|
||||
|
||||
};
|
||||
|
||||
const hide = async () => {
|
||||
@ -114,7 +113,6 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
|
||||
hide();
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
isVisible && (
|
||||
<AnimatedView
|
||||
|
@ -37,16 +37,8 @@ class MainButton extends Component {
|
||||
};
|
||||
|
||||
_getBody = () => {
|
||||
const {
|
||||
isLoading,
|
||||
text,
|
||||
secondText,
|
||||
iconColor,
|
||||
iconName,
|
||||
source,
|
||||
iconType,
|
||||
textStyle,
|
||||
} = this.props;
|
||||
const { isLoading, text, secondText, iconColor, iconName, source, iconType, textStyle } =
|
||||
this.props;
|
||||
|
||||
if (isLoading) {
|
||||
this._getIndicator();
|
||||
|
@ -60,7 +60,7 @@ export const UsernameAutofillBar = ({ text, selection, onApplyUsername }: Props)
|
||||
200,
|
||||
{ leading: true },
|
||||
),
|
||||
[]
|
||||
[],
|
||||
);
|
||||
|
||||
const _onUserSelect = (username) => {
|
||||
|
@ -35,7 +35,6 @@ const postsListContainer = (
|
||||
}: postsListContainerProps,
|
||||
ref,
|
||||
) => {
|
||||
|
||||
const flatListRef = useRef(null);
|
||||
|
||||
const [imageHeights, setImageHeights] = useState(new Map<string, number>());
|
||||
@ -64,7 +63,6 @@ const postsListContainer = (
|
||||
animated: false,
|
||||
});
|
||||
}
|
||||
|
||||
}, [posts]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -73,7 +71,6 @@ const postsListContainer = (
|
||||
offset: posts && posts.length == 0 ? 0 : scrollPosition,
|
||||
animated: false,
|
||||
});
|
||||
|
||||
}, [scrollPosition]);
|
||||
|
||||
const _setImageHeightInMap = (mapKey: string, height: number) => {
|
||||
@ -116,7 +113,6 @@ const postsListContainer = (
|
||||
posts &&
|
||||
posts.filter((x) => x.permlink === p.permlink).length <= 0
|
||||
) {
|
||||
|
||||
//get image height from cache if available
|
||||
const localId = p.author + p.permlink;
|
||||
const imgHeight = imageHeights.get(localId);
|
||||
@ -136,7 +132,6 @@ const postsListContainer = (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let isMuted = mutes && mutes.indexOf(item.author) > -1;
|
||||
if (!isMuted && get(item, 'author', null)) {
|
||||
//get image height from cache if available
|
||||
@ -157,7 +152,7 @@ const postsListContainer = (
|
||||
);
|
||||
}
|
||||
return e;
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeContainer>
|
||||
@ -199,7 +194,6 @@ const postsListContainer = (
|
||||
</ThemeContainer>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default forwardRef(postsListContainer);
|
||||
|
@ -56,13 +56,8 @@ class TabBar extends PureComponent {
|
||||
};
|
||||
|
||||
_renderUnderline = () => {
|
||||
const {
|
||||
tabs,
|
||||
tabUnderlineDefaultWidth,
|
||||
tabUnderlineScaleX,
|
||||
scrollValue,
|
||||
underlineStyle,
|
||||
} = this.props;
|
||||
const { tabs, tabUnderlineDefaultWidth, tabUnderlineScaleX, scrollValue, underlineStyle } =
|
||||
this.props;
|
||||
const { activeColor } = this.state;
|
||||
|
||||
const containerWidth = getWindowDimensions().nativeWidth;
|
||||
|
@ -76,8 +76,8 @@ export const StackNavigator = ({ initRoute }) => {
|
||||
return (
|
||||
<RootStack.Navigator
|
||||
initialRouteName={initRoute}
|
||||
screenOptions={{ headerShown: false, animation: 'slide_from_bottom' }}>
|
||||
|
||||
screenOptions={{ headerShown: false, animation: 'slide_from_bottom' }}
|
||||
>
|
||||
<RootStack.Screen name={ROUTES.STACK.MAIN} component={MainStackNavigator} />
|
||||
|
||||
<RootStack.Screen name={ROUTES.SCREENS.REGISTER} component={Register} />
|
||||
@ -91,5 +91,3 @@ export const StackNavigator = ({ initRoute }) => {
|
||||
</RootStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
@ -50,7 +50,8 @@ const RegisterScreen = ({ navigation, route }) => {
|
||||
}, []);
|
||||
|
||||
const _handleEmailChange = (value) => {
|
||||
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
const re =
|
||||
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
setIsEmailValid(re.test(value));
|
||||
setEmail(value);
|
||||
};
|
||||
|
@ -39,9 +39,8 @@ const CommunitiesResultsContainer = ({ children, searchValue }) => {
|
||||
// handle cache when searchResultsScreen data updates in communities reducer
|
||||
useEffect(() => {
|
||||
if (subscribingCommunitiesInSearchResultsScreen && selectedCommunityItem) {
|
||||
const { status } = subscribingCommunitiesInSearchResultsScreen[
|
||||
selectedCommunityItem.communityId
|
||||
];
|
||||
const { status } =
|
||||
subscribingCommunitiesInSearchResultsScreen[selectedCommunityItem.communityId];
|
||||
if (status === statusMessage.SUCCESS) {
|
||||
dispatch(updateSubscribedCommunitiesCache(selectedCommunityItem));
|
||||
}
|
||||
|
@ -125,12 +125,9 @@ export default (url) => {
|
||||
}
|
||||
|
||||
if (
|
||||
[
|
||||
'https://ecency.com',
|
||||
'https://hive.blog',
|
||||
'https://peakd.com',
|
||||
'https://leofinance.io',
|
||||
].some((x) => url.startsWith(x))
|
||||
['https://ecency.com', 'https://hive.blog', 'https://peakd.com', 'https://leofinance.io'].some(
|
||||
(x) => url.startsWith(x),
|
||||
)
|
||||
) {
|
||||
return parseAuthorPermlink(url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user