File About.tsx
has 298 lines of code (exceeds 250 allowed). Consider refactoring.
Function SelectNotifications
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
export function SelectNotifications(
props: SelectNotificationsProps
): React.ReactElement {
const { style, ...rest } = props;
const { api } = useContext(ApiContext);
Function Search
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
export function Search(props: SearchProps): React.ReactElement {
const {
navigation: { goBack },
} = props;
Function getCigarettesHeight
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
function getCigarettesHeight(count: number): number {
return scale(
count <= THRESHOLD.FIRST
? SIZES.BIG
: count <= THRESHOLD.SECOND
Function Cigarettes
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
export function Cigarettes(props: CigarettesProps): React.ReactElement {
const {
cigarettes: realCigarettes,
cigaretteStyle,
fullCigaretteLength = 90,
Function renderEmptyList
has 5 arguments (exceeds 4 allowed). Consider refactoring.
GeoapifyError: Error | undefined,
hits: GeoapifyRes[],
loading: boolean,
search: string,
isGps: boolean
Function Button
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
export function Button(props: ButtonProps): React.ReactElement {
const {
as: Wrapper = TouchableOpacity,
children,
onPress,
Avoid too many return
statements within this function.
return <Text style={styles.noResults}>Waiting for results.</Text>;
Avoid too many return
statements within this function.
return <Text style={styles.noResults}>No results.</Text>;
Function Banner
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
export function Banner({
asTouchable,
children,
elevated,
onClick,
Function Footer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
export function Footer(props: FooterProps): React.ReactElement {
const { api } = useContext(ApiContext);
const { currentLocation } = useContext(CurrentLocationContext);
const { navigation, style, ...rest } = props;