Showing 502 of 8,855 total issues
File MintScreen.tsx
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, {Fragment, useState} from 'react';
import {
Text,
View,
StyleSheet,
- Create a ticketCreate a ticket
Function ProfileShareAdd
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ProfileShareAdd: React.FC<IProfileShareAdd> = ({}) => {
const [memo, setMemo] = useState('');
const [expiration, setExpiration] = useState('-1');
const [createdLink, setCreatedLink] = useState<ISharedLink>({
_id: '',
- Create a ticketCreate a ticket
Function ChatDetailMemebersList
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ChatDetailMemebersList:React.FC<ChatDetailMemebersListProps> = (props: ChatDetailMemebersListProps) => {
//component props
const {
handleMemberLongTap,
- Create a ticketCreate a ticket
Function ManageData
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
- Create a ticketCreate a ticket
Function BasicTable
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function BasicTable() {
const apps = useStoreState((state) => state.apps)
const [open, setOpen] = React.useState(false)
const [showDelete, setShowDelete] = React.useState(false)
const [showEdit, setShowEdit] = React.useState(false)
- Create a ticketCreate a ticket
Function ChatDetailHeader
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ChatDetailHeader: React.FunctionComponent<ChatDetailHeaderProps> = (
props: ChatDetailHeaderProps,
) => {
//component props
const {deleteRoomDialog, toggleFavourite, currentRoomDetail} = props;
- Create a ticketCreate a ticket
Function userData
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
export const userData = (type, jid, data, dataGroup) => {
let userIndex = userDatalist.findIndex(user => user.name === jid);
if (userIndex < 0) {
console.log('=>=> Create user data', jid);
- 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 parseValue
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
const parseValue = (
value: string,
partTypes: PartType[],
positionOffset = 0,
): {plainText: string; parts: Part[]} => {
- 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 messagingTimeout
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const messagingTimeout = (data, timeToAdd) => {
console.log("START TIMEOUT ", timeToAdd)
const timeData = timeToAdd.split(":");
const addedTime = addingTime(data, timeData);
- Create a ticketCreate a ticket
Function RenderChatFooter
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RenderChatFooter = (props: RenderChatFooterProps) => {
const boxHeight = useSharedValue(0);
const {
fileUploadProgress,
setFileUploadProgress,
- Create a ticketCreate a ticket
ChatStore
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class ChatStore {
messages: IMessage[] = [];
xmpp: any = null;
xmppError: any = '';
roomList: roomListProps[] | [] = [];
- Create a ticketCreate a ticket
Function ChatDetails
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ChatDetails() {
const { roomJID } = useParams<{ roomJID: string }>();
const [newDescription, setNewDescription] = useState("");
const [newRoomName, setNewRoomName] = useState("");
- Create a ticketCreate a ticket
Function UsernameSignInForm
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function UsernameSignInForm(props: TProps) {
const setUser = useStoreState((state) => state.setUser);
const history = useHistory();
const formik = useFormik({
initialValues: {
- Create a ticketCreate a ticket
Function createMessageObject
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createMessageObject = (messageDetails = []) => {
const message: IMessage = {
_id: '',
text: '',
createdAt: '',
- Create a ticketCreate a ticket
Function AddTabPanel
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const AddTabPanel = (props: AddTabPanelProps) => {
const {getSharedLinks} = props
const [expiration, setExpiration] = React.useState((-1).toString());
const [memo, setMemo] = React.useState('');
- Create a ticketCreate a ticket
Function QRCodeGenerator
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const QRCodeGenerator = (props: QRCodeGeneratorProps) => {
const svg = useRef(null);
const {apiStore} = useStores();
const {shareKey, close} = props;
- Create a ticketCreate a ticket
Function ScanScreen
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ScanScreen = () => {
//mobx stores
const {loginStore, chatStore, apiStore} = useStores();
//mobx stores
- Create a ticketCreate a ticket
Function ProfileModal
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ProfileModal = (props: ProfileModalProps) => {
const {
isVisible,
onBackdropPress,
modalType,
- Create a ticketCreate a ticket
File ChatTransferDialog.tsx
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useMemo, useState } from "react";
import {
Dialog,
DialogContent,
- Create a ticketCreate a ticket
File questions.create.ts
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Client } from '@xmpp/client'
import Web3 from 'web3'
import { Message, Participant, Question } from './types'
import { sendMessage } from './utils'
import * as api from './api'
- Create a ticketCreate a ticket