Showing 502 of 8,855 total issues
Function ProfileScreen
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const ProfileScreen = observer(() => {
const {loginStore, walletStore, chatStore, apiStore} = useStores();
const navigation = useNavigation();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Menu
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Menu: React.FC<IMenu> = ({}) => {
const { active, deactivate } = useWeb3React();
const user = useStoreState((state) => state.user);
const history = useHistory();
const ACL = useStoreState((state) => state.ACL);
- Create a ticketCreate a ticket
Function OptionsItem
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function OptionsItem(props:optionsItemProps){
const {
handleChange,
selectedValue,
title,
- Create a ticketCreate a ticket
Function modalContent
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
const modalContent = () => {
if (modalType === 'description') {
return isDescriptionEditable ? (
<View
justifyContent="space-evenly"
- Create a ticketCreate a ticket
File NftTransactionItem.tsx
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Copyright 2019-2022 (c) Dappros Ltd, registered in England & Wales, registration number 11455432. All rights reserved.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at https://github.com/dappros/ethora/blob/main/LICENSE.
Note: linked open-source libraries and components may be subject to their own licenses.
- Create a ticketCreate a ticket
File HomeStack.tsx
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {observer} from 'mobx-react-lite';
import React, {useEffect} from 'react';
import {appLinkingUrl} from '../../docs/config';
import {MainHeader} from '../components/MainHeader/MainHeader';
- Create a ticketCreate a ticket
Function ReplyComponent
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ReplyComponent = () => {
return (
<Button
variant="text"
style={{
- Create a ticketCreate a ticket
Function AppTopNavOwner
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AppTopNavOwner = () => {
const user = useStoreState((state) => state.user);
const balances = useStoreState((state) => state.balance);
const clearOwner = useStoreState((state) => state.clearOwner);
const [anchorElUser, setAnchorElUser] = React.useState<null | HTMLElement>(
- Create a ticketCreate a ticket
Function RegularSignIn
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const RegularSignIn: React.FC<IRegularSignIn> = ({}) => {
const [openEmail, setOpenEmail] = useState(false);
const [openUsername, setOpenUsername] = useState(false);
const [ownerRegistration, setOwnerRegistration] = useState(false);
- Create a ticketCreate a ticket
Function router
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const router = (xmpp, message, sender, receiver, requestType, receiverData, stanzaId, connectData) => {
if (requestType === 'body') {
let userStep = userSteps('getStep', receiver, null);
let handlerData = {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MessageText
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const MessageText = observer((props: any) => {
const [youtubeMetaData, setYoutubeMetaData] = useState({});
const {loginStore, apiStore, chatStore} = useStores();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ChatMediaModal
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
({open, url, type, onClose, messageData}) => {
//Mobx stores
const {chatStore, loginStore, apiStore} = useStores();
//Mobx stores
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function renderConnected
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderConnected = () => {
if (account) {
return (
<>
<View>
- Create a ticketCreate a ticket
Function renderModalContent
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderModalContent = () => {
if (isImageMimetype(type)) {
const modalButtonAction = () => {
const manipulatedWalletAddress = underscoreManipulation(
loginStore.initialData.walletAddress,
- Create a ticketCreate a ticket
Function UploadDocumentsScreen
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
const UploadDocumentsScreen = () => {
const {loginStore, walletStore, debugStore} = useStores();
const [itemName, setItemName] = useState<string>('');
// data api
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function renderMedia
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderMedia = (props: any) => {
const {
image,
realImageURL,
mimetype,
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (item.name === 'data') {
message.user.name =
item.attrs.senderFirstName + ' ' + item.attrs.senderLastName;
message.user._id = item.attrs.senderJID;
const isSystem = item.attrs.isSystemMessage === 'true';
- Create a ticketCreate a ticket
Function router
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
const router = (xmpp, message, roomJID, userJID, receiverData, receiverMessageId, connectData) => {
let userStep = userSteps('getStep', receiverData.attrs.senderJID, null);
let currentButtonType = userData('getData', userJID, null);
let handlerData = {
- Create a ticketCreate a ticket
Function OtherProfile
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function OtherProfile(props: TProps) {
const [loading, setLoading] = useState(true);
const [profile, setProfile] = useState<TProfile>();
const [transactions, setTransactions] =
useState<ExplorerRespose<ITransaction[]>>();
- Create a ticketCreate a ticket
File index.tsx
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
import DiamondIcon from "@mui/icons-material/Diamond";
import FacebookIcon from "@mui/icons-material/Facebook";
import GoogleIcon from "@mui/icons-material/Google";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
- Create a ticketCreate a ticket