Showing 502 of 8,855 total issues
Function AddNewEmailModal
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AddNewEmailModal = (props: AddNewEmailModalProps) => {
const {
setNewEmail,
submitEmail,
loading,
- Create a ticketCreate a ticket
Function RenderCoin
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RenderCoin = (props: RenderCoinProps) => {
const {tokenSymbol, tokenName, balance, index} = props;
return (
<View
style={{
- Create a ticketCreate a ticket
Function ThreadContainer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ThreadContainer: React.FC<ThreadContainerProps> = ({
roomData,
handleSetThreadView,
isThreadView,
profile,
- 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 EditProfileModal
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export default function EditProfileModal({ open, setOpen, user }: TProps) {
const [change, setChange] = useState(false);
const [loading, setLoading] = useState(false);
const setUser = useStoreState((state) => state.setUser);
- 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 RegisterScreen
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export const RegisterScreen = ({navigation}: RegisterScreenProps) => {
const [password, setPassword] = useState('');
const [username, setUsername] = useState('');
const [passwordCheck, setPasswordCheck] = useState('');
const [firstname, setFirstname] = 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 handleSendMessage
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const handleSendMessage = (message: IMessage[]) => {
const messageText = message[0].text;
const tokenAmount = message[0].tokenAmount || 0;
const receiverMessageId = message[0].receiverMessageId || 0;
const data = {
- Create a ticketCreate a ticket
Function router
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
const router = (handlerData) => {
const roomMuteIndex = muteRoomList.indexOf(handlerData.roomJID)
if(roomMuteIndex > -1){
if (messageCheck(handlerData.message, 'start translate') ||
- Create a ticketCreate a ticket
Function router
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
const router = (handlerData) => {
handlerData.userStep = userSteps('getStep', handlerData.userJID);
if (messageCheck(handlerData.message, 'close') || messageCheck(handlerData.message, 'leave')) {
return leaveHandler(handlerData);
- Create a ticketCreate a ticket
Function QRSection
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const QRSection = (props: QRSectionProps) => {
const {
user,
createdLink,
linkType
- Create a ticketCreate a ticket
Function setChatAvatar
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
const setChatAvatar = async (type: string) => {
if (type === 'image') {
launchImageLibrary(options, response => {
if (response.didCancel) {
console.log('User cancelled image picker');
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
!process.env.TYPE ||
!process.env.BOT_ADDRESS ||
!process.env.CONFERENCE_ADDRESS ||
!process.env.APP_USERNAME ||
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
!process.env.TYPE ||
!process.env.BOT_ADDRESS ||
!process.env.CONFERENCE_ADDRESS ||
!process.env.APP_USERNAME ||
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
!process.env.TYPE ||
!process.env.BOT_ADDRESS ||
!process.env.CONFERENCE_ADDRESS ||
!process.env.APP_USERNAME ||
- Create a ticketCreate a ticket
Function Explorer
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Explorer() {
const user = useStoreState((store) => store.user);
const [transactions, setTransactions] = useState<
ExplorerRespose<ITransaction[]>
>({
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
item.tokenType === 'NFMT' &&
item.balances &&
item.contractTokenIds &&
item.maxSupplies &&
- Create a ticketCreate a ticket
Function onSuccess
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onSuccess = (e: any) => {
if (!e) {
showToast('error', 'Error', 'Invalid QR', 'top');
setIsLoading(false);
return;
- Create a ticketCreate a ticket
Function setChatAvatar
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
const setChatAvatar = async (type: string) => {
if (type === 'image') {
launchImageLibrary(options, response => {
if (response.didCancel) {
console.log('User cancelled image picker');
- Create a ticketCreate a ticket
Function LinkItemComponent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LinkItemComponent(props: ProfileLinkItemComponentProps) {
const { linkItem, key, handleOpenModal, profileLink, deleteLink } = props;
return (
<Box
key={key}
- Create a ticketCreate a ticket
Function OtherItemsTable
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function OtherItemsTable(props: TProps) {
const [balances, setBalances] = React.useState<TBalances>([]);
React.useEffect(() => {
if (props.walletAddress) {
http.getPublicProfile(props.walletAddress).then((response) => {
- Create a ticketCreate a ticket
Function LinkItemComponent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LinkItemComponent(props: DocumentLinkItemComponentProps) {
const { linkItem, key, handleOpenModal, docLink, deleteLink } = props;
return (
<Box
key={key}
- Create a ticketCreate a ticket