Showing 502 of 8,855 total issues
Function sendMessage
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sendMessage = (chatName: string, jid: string, isPrevious: boolean) => {
const manipulatedWalletAddress = underscoreManipulation(
loginStore.initialData.walletAddress,
);
const textEnter =
- Create a ticketCreate a ticket
Function RootStack
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RootStack = observer(() => {
const {loginStore} = useStores();
const {
setTokenFromAsyncStorage,
setInitialDetailsFromAsyncStorage,
- Create a ticketCreate a ticket
Function AppTopNav
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const AppTopNav = () => {
const currentUntrackedChatRoom = useStoreState(
(store) => store.currentUntrackedChatRoom
);
const chatUrl = currentUntrackedChatRoom
- 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 MetaNavigation
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const MetaNavigation: React.FC<IMetaNavigation> = ({
chatId,
open,
onClose,
}) => {
- 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 NewAppModal
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function NewAppModal({ open, setOpen }: TProps) {
const fileRef = React.useRef<HTMLInputElement>(null);
const setApp = useStoreState((state) => state.setApp);
const [loading, setLoading] = 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 CreateApp
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function CreateApp() {
const [loading, setLoading] = React.useState(false);
const fileRef = React.useRef<HTMLInputElement>(null);
const formik = useFormik({
- 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 onSubmit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: (values) => {
setDisableSubmit(true);
loginUsername(values.username, values.password)
.then((result) => {
setUser({
- Create a ticketCreate a ticket
Function getPartsInterval
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getPartsInterval = (
parts: Part[],
cursor: number,
count: number,
): Part[] => {
- Create a ticketCreate a ticket
Function insertTransaction
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
new Promise(async (resolve, reject) => {
data.map(item => {
if (!item.nftTotal) item.nftTotal = '0';
const data = {
blockNumber: item.blockNumber ? item.blockNumber : 0,
- Create a ticketCreate a ticket
Function getPosition
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getPosition = (
arr: TMessageHistory[],
message: TMessageHistory,
index: number
) => {
- Create a ticketCreate a ticket
Function getConnectData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function LeftActions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const LeftActions = (props: LeftActionsProps) => {
const {toggleNotification, swipeRef, name, jid, renameChat} = props;
const {chatStore} = useStores();
return (
<>
- Create a ticketCreate a ticket
Function renderAttachment
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderAttachment = () => {
const options = walletStore.nftItems.length
? {
'Upload File': async () => await sendAttachment(),
'Display an Item': async () => await displayNftItems(),
- Create a ticketCreate a ticket
Function helpHandler
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const helpHandler = (data) => {
console.log('=> helpHandler | Message received from ', data.receiver, data.message);
if(data.userStep === 1){
return sendMessage(
- Create a ticketCreate a ticket
Function getConnectData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Method initializeFlipper
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
- Create a ticketCreate a ticket
Function loginOrRegisterSocialUser
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const loginOrRegisterSocialUser = async (
user: any,
defaultToken: string,
loginUser: any,
- Create a ticketCreate a ticket
Function onMintClick
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onMintClick = () => {
if (!avatarSource) {
showToast('error', 'Error', 'Please load the image.', 'top');
return;
}
- Create a ticketCreate a ticket
Function renderAttachment
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderAttachment = () => {
const options = walletStore.nftItems.length
? {
'Upload File': async () =>
await sendAttachment(loginStore.userToken, roomDetails),
- Create a ticketCreate a ticket
Function removeListener
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const removeListener = Linking.addEventListener('url', data => {
if (data.url) {
if (data.url.includes('profileLink')) {
const params = data.url.split(appLinkingUrl)[1];
const queryParams = new URLSearchParams(params);
- Create a ticketCreate a ticket