Showing 502 of 8,855 total issues
Function ChatContainer
has 1064 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ChatContainer = observer((props: ChatContainerProps) => {
//props
const {
containerType,
roomDetails,
- Create a ticketCreate a ticket
File Tnc.tsx
has 1866 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import "./Tnc.scss";
type TProps = {
- Create a ticketCreate a ticket
Function ChatInRoom
has 696 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ChatInRoom() {
const messages = useStoreState((state) => state.historyMessages);
const user = useStoreState((store) => store.user);
const userChatRooms = useStoreState((store) => store.userChatRooms);
const currentThreadViewMessage = useStoreState(
- Create a ticketCreate a ticket
File ChatContainer.tsx
has 1260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {Actions, GiftedChat, Send} from 'react-native-gifted-chat';
import {AudioSendButton} from './AudioSendButton';
import {
ActivityIndicator,
- Create a ticketCreate a ticket
File chatStore.ts
has 1090 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//@ts-ignore
import {client, xml} from '@xmpp/client';
import {makeAutoObservable, runInAction, toJS} from 'mobx';
import {
defaultChatBackgroundTheme,
- Create a ticketCreate a ticket
Function getTnc
has 537 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTnc(
company: string,
fname: string,
lname: string,
email: string,
- Create a ticketCreate a ticket
File ChatExperimental.tsx
has 1004 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {observer} from 'mobx-react-lite';
import React, {useEffect, useRef, useState} from 'react';
import {GiftedChat, Send, Actions} from 'react-native-gifted-chat';
import {useStores} from '../../stores/context';
import {
- Create a ticketCreate a ticket
File stanzas.ts
has 935 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {xml} from '@xmpp/client';
import {ApiStore} from '../stores/apiStore';
import {XMPP_TYPES} from './xmppConstants';
const store = new ApiStore();
- Create a ticketCreate a ticket
File xmpp.ts
has 798 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import xmpp, { xml } from "@xmpp/client";
import { Client } from "@xmpp/client";
import { CONFERENCEDOMAIN, DOMAIN, SERVICE } from "./constants";
import { useStoreState } from "./store";
import { walletToUsername } from "./utils/walletManipulation";
- Create a ticketCreate a ticket
File Chat.tsx
has 794 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, {
useCallback,
useEffect,
useMemo,
useRef,
- Create a ticketCreate a ticket
Function UploadDocumentsScreen
has 374 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UploadDocumentsScreen = (props: MintScreenProps) => {
const {loginStore, walletStore, apiStore, debugStore} = useStores();
const navigation = useNavigation();
const [itemName, setItemName] = useState<string>('');
- Create a ticketCreate a ticket
Function MintScreen
has 368 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MintScreen = (props: MintScreenProps) => {
const {loginStore, walletStore, apiStore} = useStores();
const navigation = useNavigation();
const [itemName, setItemName] = useState<string>('');
- Create a ticketCreate a ticket
Function ProfileScreen
has 367 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ProfileScreen = observer(() => {
const {loginStore, walletStore, chatStore, apiStore} = useStores();
const navigation = useNavigation();
- Create a ticketCreate a ticket
File OwnerRegistrationModal.tsx
has 769 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState } from "react";
import Dialog from "@mui/material/Dialog";
import DialogTitle from "@mui/material/DialogTitle";
import Box from "@mui/material/Box";
import IconButton from "@mui/material/IconButton";
- Create a ticketCreate a ticket
Function _useStore
has 356 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
immer((set, get) => {
return {
user: {
firstName: "",
lastName: "",
- Create a ticketCreate a ticket
Function Bubble
has 351 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Bubble = observer((props: BubbleProps) => {
const {chatStore} = useStores();
const [width, setWidth] = useState(0);
const initialAnimationValue = new Animated.Value(0);
- Create a ticketCreate a ticket
Function ChatScreen
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
Open
const ChatScreen = observer(({route, navigation}: any) => {
const {loginStore, chatStore, walletStore, apiStore, debugStore} =
useStores();
const {firstName, lastName, walletAddress} = loginStore.initialData;
- 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 StatisticsPage
has 329 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function StatisticsPage() {
const [value, setValue] = React.useState(0);
const [apiCount, setApiCount] = React.useState();
const [sessionsCount, setSessionsCount] = React.useState();
const [transactionCount, setTransactionCount] = React.useState();
- Create a ticketCreate a ticket
File config.ts
has 691 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Master switches
/*
START SCREEN switch.
This specifies which screen is going to be the default one for Users. See options below.
- Create a ticketCreate a ticket
Function ChatContainer
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
Open
const ChatContainer = observer((props: ChatContainerProps) => {
//props
const {
containerType,
roomDetails,
- 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"