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

feat(uiweb): return response in createGroupModal #1198

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

Siddesh7
Copy link
Collaborator

@Siddesh7 Siddesh7 commented Apr 1, 2024

returns group information when group is successfully created in uiweb createGroupModal

Closes #1197

return group information when group is successfully created in uiweb createGroupModal
@Siddesh7 Siddesh7 self-assigned this Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

In the file packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx:

  1. There is a missing closing curly brace } in the handleAddWallets function:

    const handleAddWallets = () => {
      setActiveComponent((activeComponent + 3) as CreateGroupStepKeys);
    }
  2. There is a missing closing curly brace } in the showError function:

    const showError = (errorMessage: string) => {
      groupInfoToast.showMessageToast({
        toastTitle: 'Error',
        toastMessage: errorMessage,
        toastType: 'ERROR',
        getToastIcon: (size) => <MdError size={size} color="red" />,
      });
    }
  3. The getEncryptionType function is missing a closing curly brace } before the return true; statement:

    const getEncryptionType = () => {
      console.debug(groupInputDetails.groupEncryptionType, 'encryptionTypeee');
      if (groupInputDetails.groupEncryptionType === 'encrypted') {
        return false;
      }
      return true;
    }
  4. The AddCriteria component is being called without any children components:

    case CREATE_GROUP_STEP_KEYS.ADD_CRITERIA:
        <AddCriteria />
  5. There seems to be a commented out code snippet //use the theme which is incomplete and may need to be revisited.

  6. In the UploadContainer styled component, there is a missing closing backtick at the end of the ImageContainer styled component:

    const ImageContainer = styled.div<{ theme: IChatTheme }>`
      margin-top: 10px;
      border-radius: 32px;
      background: ${(props) => props.theme.backgroundColor!.modalHoverBackground};
      width: 128px;
      height: 128px;
      max-height: 128px;
      display: flex;
      align-items: center;
      justify-content: center;

Overall, the code review has identified some syntax errors and missing elements that need to be addressed.

All looks good.

Copy link
Collaborator

@mishramonalisha76 mishramonalisha76 left a comment

Choose a reason for hiding this comment

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

LGTM, just change the base to alpha

@Siddesh7 Siddesh7 changed the base branch from main to alpha April 8, 2024 09:51
@mishramonalisha76 mishramonalisha76 merged commit 241080d into alpha Apr 8, 2024
1 check passed
Copy link

github-actions bot commented Apr 8, 2024

File: packages/uiweb/src/lib/components/chat/CreateGroup/AddCriteria.tsx

  1. There are some syntax errors in the code block where dropdownChainsValues are defined. Each object should be structured correctly with id, value, title, icon, and function properties.
  2. The last object in the dropdownChainsValues array is missing the structure for id, value, title, icon, and function.
  3. It seems like the value extraction for BLOCKCHAIN_NETWORK is incorrect in some places. It should be like BLOCKCHAIN_NETWORK[env] instead of BLOCKCHAIN_NETWORK[env as keyof typeof BLOCKCHAIN_NETWORK].

File: packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx

  1. There is a typo in the DefineCondition component import statement should be 'DefineCondition' instead of 'DefineCondtion'.
  2. The handleAddWallets function is missing a closing brace '}'.
  3. The getEncryptionType function is missing a closing brace '}'.
  4. There is a typo in the setShowError function call, it should be showError instead of setShowError.
  5. The getEncryptionType function seems to have a logic issue with the return statements.
  6. The conditional check in the createGroupService function seems to have a syntax error with the missing closing brace '}'.
  7. The renderComponent function seems to be missing a closing brace for the switch statement.
  8. There is a typo in the handlePreviousfromAddWallets function, should be 'handlePreviousFromAddWallets' instead.
  9. The ModalHeaderProps interface seems to be missing some properties and interfaces used in the CreateGroupDetail component.
  10. The handleChange function parameter type 'e: Event' should be 'e: ChangeEvent'.
  11. There is a syntax error in the ImageContainer styled component, missing a closing brace '}'.
  12. The ErrorSpan styled component is missing a closing brace '}'.

Overall, there are multiple syntax errors, typos, and logic issues that need to be fixed in the code.

All looks good.

mishramonalisha76 added a commit that referenced this pull request Apr 8, 2024
* feat(uiweb): return response in createGroupModal

return group information when group is successfully created in uiweb createGroupModal

* fix: fixed build issue

---------

Co-authored-by: Siddesh Sankhya <[email protected]>
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.

😈 [Improvement Proposal] - Return Response after Group Creation via CreateGroupModal
2 participants