Showing 502 of 8,855 total issues
Function openDirectChat
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const openDirectChat = () => {
createPrivateChat(
user.walletAddress,
walletAddress,
user.firstName,
- Create a ticketCreate a ticket
Function roomConfigurationForm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const roomConfigurationForm = (
user_jid: string,
chat_jid: string,
roomConfig: any,
xmpp: any,
- Create a ticketCreate a ticket
Function onSubmit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: (fd) => {
setDisableSubmit(true);
registerUsername(fd.username, fd.password, fd.firstName, fd.lastName)
.then((resp) => {
loginUsername(fd.username, fd.password).then((result) => {
- Create a ticketCreate a ticket
Function generateValueFromPartsAndChangedText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const generateValueFromPartsAndChangedText = (
parts: Part[],
originalText: string,
changedText: string,
) => {
- Create a ticketCreate a ticket
Function submitMediaMessage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const submitMediaMessage = (
mediaListArray: IMediaProps[],
roomDetail: roomListProps,
xmpp: any,
waveForm?: any,
- Create a ticketCreate a ticket
Function App
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const App = () => {
React.useEffect(() => {
const unsubscribe = NetInfo.addEventListener(state => {
console.log('Connection type', state.type);
console.log('Is connected?', state.isConnected);
- Create a ticketCreate a ticket
Function onStopRecord
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onStopRecord = async () => {
setRecording(false);
animateMediaButtonOut();
const result = await audioRecorderPlayer.stopRecorder();
- Create a ticketCreate a ticket
Function startMint
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const startMint = (data) => {
console.log('=> startMint | Message received from ', data.userJID, data.message);
getMintItemData(data.receiverData.attrs.contractAddress).then(itemsData => {
console.log('GET MINT ITEM DATA => ', itemsData)
- 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 router
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const router = (handlerData) => {
const roomMuteIndex = muteRoomList.indexOf(handlerData.roomJID)
if(roomMuteIndex > -1){
if (messageCheck(handlerData.message, 'start translate') ||
- 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 generateMessage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const generateMessage = (data, message, isSystemMessage, noName) => {
let userName;
let finalMessage;
//Getting username
- 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 Visibility
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const Visibility: React.FC<VisibilityProps> = ({ handleChangeTab }) => {
const updateUserProfilePermission = useStoreState(
(state) => state.updateUserProfilePermission
);
const updateUserDocumentsPermission = 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 DocumentsCreateModal
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function DocumentsCreateModal(props: TProps) {
const [loading, setLoading] = React.useState(false);
const formik = useFormik({
initialValues: {
- 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 UserCard
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function UserCard({ profile, walletAddress }: TProps) {
const [edit, setEdit] = useState(false);
const user = useStoreState((state) => state.user);
const [showQrModal, setShowQrModal] = 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 QRCodeGenerator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const QRCodeGenerator = (props: QRCodeGeneratorProps) => {
const svg = useRef(null);
const {apiStore} = useStores();
const {shareKey, close} = props;
- 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 timerId
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
let timerId = setInterval(() => {
const currentTime = new Date();
let timeDifference = Math.abs(addedTime.getTime() - currentTime.getTime());
let differenceUnMinutes = (timeDifference / 1000) / 60;
- Create a ticketCreate a ticket
Function messages
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const messages = () => {
return {
general: {
welcomeMessage: 'Hey! Questionnaire Bot launched',
botStatusOnline: 'Questionnaire bot Online',
- Create a ticketCreate a ticket
Function startMint
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const startMint = (data) => {
console.log('=> startMint | Message received from ', data.userJID, data.message);
getMintItemData(data.receiverData.attrs.contractAddress).then(itemsData => {
console.log('GET MINT ITEM DATA => ', itemsData)
- Create a ticketCreate a ticket
Function transferItemHandler
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const transferItemHandler = (data) => {
logCurrentHandler('transferItemHandler', data.userJID, data.message);
getBalance().then(result => {
const randomItem = getRandomNFT(result)[0];
if (randomItem) {
- Create a ticketCreate a ticket
Function CustomMessageInput
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CustomMessageInput = (props: CustomMessageInputProps) => {
const {
onPaste,
placeholder,
- Create a ticketCreate a ticket
Function updateAcl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const updateAcl = async () => {
setLoading(true);
try {
const filteredApplication = Object.fromEntries(
Object.entries(userAcl!.result!.application).map((item) => {
- Create a ticketCreate a ticket