Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] - Request count not getting updated #1553

Merged
merged 5 commits into from
May 23, 2024
Merged

Conversation

corlard3y
Copy link
Collaborator

This PR addresses the second issue in - #1570. After we can transfer issue to SDK to fix first issue

cc: @rohitmalhotra1420 @mishramonalisha76

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
push-dapp ❌ Failed (Inspect) May 22, 2024 10:07am

Copy link

In ChatModule.tsx:

  • Line 73: userPushSDKInstance?.readmode()
  • Line 144: userPushSDKInstance?.readmode()
  • Line 330: <ChatQR... width="75%" /> is missing closing />.

In ChatSidebarSection.tsx:

  • Line 35: value: 'inline-block' is missing opening curly brace {.
  • Line 38: type loadingData = { loading: boolean; preload: boolean; paging: boolean; finished: boolean }; should be type loadingData = { loading: boolean; preload: boolean; paging: boolean; finished: boolean };.
  • Line 67: return state.user; is missing closing curly brace }.
  • Line 137: if (chats.length > 0) { should have a corresponding else block.
  • Line 187: onChatsCountChange is missing closing curly brace }.
  • Line 201: onChatsCountChange is missing closing parenthesis ).
  • Line 221: {searchedUser && activeTab == 3 && ( is missing closing curly brace } after searchParamter={searchedUser || ''}.
  • Line 307: onUserProfileUpdateModalOpen is missing closing brace }.

In Inbox.tsx:

  • Line 10: const NotifsOuter = styled.div is missing closing brace }.
  • Line 15: const SnapSection = styled(ItemHV2) is missing closing brace }.
  • Line 43: const InstallPushSnap = styled(SpanV2) missing closing brace }.

All files have multiple issues with braces and missing characters.

Note: Further review is recommended after addressing these issues.

Copy link

In the ChatModule.tsx file, I've identified the following issues:

  1. In the section:

    {displayQR && !isMobile && (
      <>
        <ChatQR
          type={LOADER_TYPE.STANDALONE}
          overlay={LOADER_OVERLAY.ONTOP}
          blur={GLOBALS.ADJUSTMENTS.BLUR.DEFAULT}
          width="75%"
      </>

    There seems to be a missing closing angle bracket > after the width="75%" line. It should be updated to close the <ChatQR> component properly.

  2. In the ChatSidebarSection.tsx file, I found the following issues:

    • The useNavigate hook is not properly imported. It should be updated to import { useNavigate } from 'react-router-dom';.
    • There is a missing closing angle bracket > after the onPreload function in the ChatPreviewList component. It should be added to properly close the component.

After addressing these issues, the code seems to be logically structured. If you make the necessary fixes, everything should work well.

All looks good.

Copy link

In the ChatModule.tsx file:

  1. Typo: In the <ChatSidebarContainer> component, the prop chatActive is being passed as isUserChatting && userPushSDKInstance && !userPushSDKInstance?.readmode(). This condition is being repeated unnecessarily. It can be simplified to just chatActive={isUserChatting} since the isUserChatting already includes the required conditions.

  2. Typo: In the <ChatSection> component, the prop setChatId should be setSelectedChatId for consistency in naming with the rest of the code.

  3. Typo: In the <ChatQR> component, there is a missing closing angle bracket > at the end of the component.

In the ChatSidebarSection.tsx file:

  1. Typo: In the createGroupOnMouseEnter array variable, there is a missing object opening curly brace { before the name property.

  2. Typo: In the createGroupOnMouseLeave array variable, there are missing opening and closing curly braces for the objects.

  3. Typo: The loadingData type definition is incomplete. The name and value properties assigned are out of place and should be inside an object or corrected accordingly.

  4. Logic: In the setNumberOfChatReqs function, the condition chatId == RecommendedChatLists[0]?.payload?.chatId should be handled more robustly, considering potential null values.

  5. Logic: In the onChatsCountChange function, there is a typo in the console.log message: onChatsCountChage should be corrected to onChatsCountChange.

  6. Logic: The <ChatPreviewSearchList> component is not correctly closed. The closing tag should be </ChatPreviewSearchList>.

Overall, there are some typos and logic considerations that need to be addressed in both files.

Copy link

github-actions bot commented May 22, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-23 14:49 UTC

Copy link
Collaborator

@rohitmalhotra1420 rohitmalhotra1420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@rohitmalhotra1420 rohitmalhotra1420 merged commit 9660c4a into main May 23, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [BUG] - Request count not getting updated
3 participants