Showing 502 of 8,855 total issues
Function HomeStackScreen
has 272 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const HomeStackScreen = observer(() => {
const {chatStore, loginStore, walletStore, apiStore} = useStores();
const {initialData} = loginStore;
const {xmppPassword, xmppUsername, walletAddress} = initialData;
const navigation = useNavigation<HomeStackNavigationProp>();
- Create a ticketCreate a ticket
File index.ts
has 612 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import create from "zustand";
import { immer } from "zustand/middleware/immer";
import { persist, devtools } from "zustand/middleware";
import * as http from "../http";
import { TCombinedMimeType } from "../constants";
- Create a ticketCreate a ticket
Function NftItemHistoryScreen
has 264 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NftItemHistoryScreen = (props: any) => {
const {item, userWalletAddress} = props.route.params.params;
const {loginStore, walletStore} = useStores();
- Create a ticketCreate a ticket
Function Signon
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Signon() {
const setUser = useStoreState((state) => state.setUser);
const user = useStoreState((state) => state.user);
const query = useQuery();
const history = useHistory();
- Create a ticketCreate a ticket
File http.ts
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import axios from "axios";
import { config } from "./config";
import {
ExplorerRespose,
IBlock,
- Create a ticketCreate a ticket
Function MessageText
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const MessageText = observer((props: any) => {
const [youtubeMetaData, setYoutubeMetaData] = useState({});
const {loginStore, apiStore, chatStore} = useStores();
- Create a ticketCreate a ticket
Function MintScreen
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MintScreen = () => {
//mobx stores
const {loginStore, walletStore} = useStores();
//mobx stores
- Create a ticketCreate a ticket
Function Bubble
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
Open
const Bubble = observer((props: BubbleProps) => {
const {chatStore} = useStores();
const [width, setWidth] = useState(0);
const initialAnimationValue = new Animated.Value(0);
- 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
File MessageBubble.tsx
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
Function AuthenticationScreen
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const AuthenticationScreen: React.FC<IAuthentication> = ({ }) => {
//mobx stores
const { loginStore } = useStores();
//mobx stores
- Create a ticketCreate a ticket
File walletStore.ts
has 541 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {makeAutoObservable, runInAction} from 'mobx';
import {Alert} from 'react-native';
import {httpGet, httpPost} from '../config/apiService';
import {
docsURL,
- Create a ticketCreate a ticket
Function UsersTable
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function UsersTable() {
const apps = useStoreState((state) => state.apps);
const ownerAccess = useStoreState((state) => state.user.ACL.ownerAccess);
const user = useStoreState((state) => state.user);
const [showNewUser, setShowNewUser] = React.useState(false);
- Create a ticketCreate a ticket
Function ChatInRoom
has a Cognitive Complexity of 57 (exceeds 5 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(
- 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 UploadDocumentsScreen
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UploadDocumentsScreen = () => {
const {loginStore, walletStore, debugStore} = useStores();
const [itemName, setItemName] = useState<string>('');
// data api
- Create a ticketCreate a ticket
File UploadDocumentsScreen.tsx
has 491 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, {useState} from 'react';
import {
Text,
View,
StyleSheet,
- Create a ticketCreate a ticket
Function main
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const main = async () => {
const loginResponse = await login(USERNAME, PASSWORD);
if (!loginResponse) {
throw new Error("Bad creads for login");
- Create a ticketCreate a ticket
File MintScreen.tsx
has 480 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 AppTopNav
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AppTopNav = () => {
const currentUntrackedChatRoom = useStoreState(
(store) => store.currentUntrackedChatRoom
);
const chatUrl = currentUntrackedChatRoom
- Create a ticketCreate a ticket
Function renderDialogContent
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderDialogContent = () => {
if (!message) return null;
switch (dialogType) {
case dialogTypes.clarification:
return (
- Create a ticketCreate a ticket
Function NewChatScreen
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NewChatScreen = (props: NewChatScreenProps) => {
const [chatAvatar, setChatAvatar] = useState();
const [chatName, setChatName] = useState('');
const [chatDescription, setChatDescription] = useState('');
const [loading, setLoading] = useState(false);
- Create a ticketCreate a ticket