Showing 502 of 8,855 total issues
Function xmppSender
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const xmppSender = (data, message, type, isSystemMessage, tokenAmount, buttons) => {
sendTyping(data.xmpp, data.connectData, data.roomJID, 'pausedComposing').then(() => {
data.xmpp.send(xml('message', {
to: data.roomJID,
type: data.receiverData ? 'groupchat' : type,
- 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 getWritingTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getWritingTime = (message) => {
if (message.length <= 120) {
return 2000
}
if (message.length <= 250 && message.length > 120) {
- 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 getWritingTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getWritingTime = (message) => {
if (message.length <= 120) {
return 2000
}
if (message.length <= 250 && message.length > 120) {
- 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 getWritingTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getWritingTime = (message) => {
if (message.length <= 120) {
return 2000
}
if (message.length <= 250 && message.length > 120) {
- 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 getWritingTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getWritingTime = (message) => {
if (message.length <= 120) {
return 2000
}
if (message.length <= 250 && message.length > 120) {
- 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 ChangeImage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function ChangeImage({ open, setOpen }: TProps) {
const user = useStoreState((state) => state.user);
const setUser = useStoreState((state) => state.setUser);
const fileRef = useRef<HTMLInputElement>(null);
const [imgSrc, setImgSrc] = useState("");
- 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 TransactionDetails
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const TransactionDetails: React.FC<ITransactionDetailsProps> = (
props
) => {
const [transactionDetails, setTransactionDetails] = useState<
ITransaction | {}
- 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 OwnerRegistration
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function OwnerRegistration({ open, setOpen }: TProps) {
const setOwner = useStoreState((state) => state.setOwner);
const history = useHistory();
const [termsOpen, setTermsOpen] = useState(false);
const [loading, setLoading] = useState(false);
- 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 Provenance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Provenance: React.FC<IProvenance> = ({}) => {
const location = useLocation<{
nftItem: TBalance & IDocument;
walletAddress: string;
}>();
- 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 DocumentsShare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const DocumentsShare = (props: DocumentsShareProps) => {
const [tab, setTab] = React.useState(0);
const [openModal, setOpenModal] = React.useState(false);
const [loading, setLoading] = React.useState(false);
const [sharedLinks, setSharedLinks] = React.useState<ISharedLink[]>([]);
- 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 BlockDetails
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function BlockDetails(props) {
const [blockDetails, setBlockDetails] = useState<IBlock | {}>({});
const [loading, setLoading] = useState(false);
const params = useParams<{ blockNumber: string }>();
const getDetails = async () => {
- 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 validate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const validate = (values: Record<string, string>) => {
const errors: Record<string, string> = {};
if (!values.email) {
errors.email = "Required";
- 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 ProfileShareTab
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ProfileShareTab = (props: ProfileShareTabProps) => {
const [tab, setTab] = React.useState(0);
const [loading, setLoading] = React.useState(false);
const [sharedLinks, setSharedLinks] = React.useState<ISharedLink[]>([]);
- 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 ManageData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ManageData = (props: ManageDataProps) => {
const [deleteDialogOpen, setDeleteDialogOpen] = React.useState(false);
const [loading, setLoading] = React.useState(false);
const { showSnackbar } = useSnackbar();
const clearUser = useStoreState((state) => state.clearUser);
- 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 TransferItemsModal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function TransferItemsModal({ open, setOpen, item }: TProps) {
const [loading, setLoading] = useState(false);
const setBalance = useStoreState((state) => state.setBalance);
const balance = useStoreState((state) => state.balance);
- 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 MembersList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function MembersList() {
const { roomJID }: any = useParams();
const userChatRooms = useStoreState((store) => store.userChatRooms);
const membersList = useStoreState((store) =>
store.roomMemberInfo.filter((item) => item.name !== "none")
- 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 MetamaskModal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function MetamaskModal({ open, setOpen }: TProps) {
const { account, library, deactivate } = useWeb3React();
const setUser = useStoreState((state) => state.setUser);
const history = useHistory();
const formik = useFormik({
- 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 produceNfmtItems
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const produceNfmtItems = (array: any[]) => {
const result = [];
const rareTotal = 20;
const uniqueTotal = 1;
- 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 HeaderMenu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const HeaderMenu = () => {
const navigation = useNavigation<HomeStackNavigationProp>();
const [open, setOpen] = useState(false);
const {loginStore, debugStore} = 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 SocialButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SocialButton = (props: SocialButtonProps) => {
const {label, color, fontFamily, fontSize, leftIcon, bg, _pressed, onPress} =
props;
return (
<Button
- 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"