Skip to content

Conversation

nezz0746
Copy link
Contributor

@nezz0746 nezz0746 commented Oct 1, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a ChatWithSupport component for enhanced user support, replacing Discord links in various components.
    • Added a global Window interface with a $crisp property for improved integration.
  • Bug Fixes

    • Updated error handling messages to prompt users to chat with support instead of directing them to Discord.
  • Refactor

    • Streamlined error handling and user interaction flows across multiple components to improve user experience.

@nezz0746 nezz0746 requested a review from Hugo0 October 1, 2024 09:22
Copy link

vercel bot commented Oct 1, 2024

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

Name Status Preview Comments Updated (UTC)
peanut-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 1, 2024 9:34am

Copy link
Contributor

coderabbitai bot commented Oct 1, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes introduce a new ChatWithSupport component across multiple files, replacing previous Discord links for user support with a direct chat option. Additionally, a new interface for the global Window object has been added to accommodate a $crisp property. The modifications enhance error handling and user interaction by integrating the chat support feature into various components, improving the overall support experience within the application.

Changes

File Path Change Summary
global.d.ts Added a new interface Window with property $crisp: any.
src/components/Cashout/Components/Confirm.view.tsx Introduced ChatWithSupport component, modifying error messages to prompt users to chat with support instead of linking to Discord.
src/components/Cashout/Components/Faq.comp.tsx Replaced a button for chat support with the CrispButton component, maintaining the overall structure of the FAQ component.
src/components/Claim/Link/Initial.view.tsx Added ChatWithSupport component, replacing Discord links in error messages and enhancing user support accessibility.
src/components/Claim/Link/Offramp/Confirm.view.tsx Integrated ChatWithSupport, updating error messages related to KYC status to encourage users to chat with support instead of using Discord.
src/components/Create/Link/Initial.view.tsx Modified recipient input validation and error handling, replacing Discord links with the CrispButton component for improved user support inquiries.
src/components/CrispChat.tsx Introduced openCrispChat function and ChatWithSupport and CrispButton components, allowing users to initiate chat with support directly.
src/components/Global/KYCComponent/index.tsx Updated KYC error handling to use ChatWithSupport, enhancing user interaction when KYC is under review or rejected.
src/components/Global/TokenSelector/TokenSelector.tsx Replaced Discord link for custom token requests with the CrispButton component, improving user interaction for support inquiries.
src/components/Welcome/welcome.tsx Removed unused imports and streamlined layout without altering core functionality.

Possibly related PRs

  • Fix/cashout rework #388: This PR includes changes to the Confirm.view.tsx file, which also features the ChatWithSupport component, indicating a direct connection to the modifications made in the main PR regarding user support communication.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7d4a1f8 and cb3a23b.

📒 Files selected for processing (8)
  • src/components/Cashout/Components/Confirm.view.tsx (2 hunks)
  • src/components/Cashout/Components/Faq.comp.tsx (2 hunks)
  • src/components/Claim/Link/Initial.view.tsx (3 hunks)
  • src/components/Claim/Link/Offramp/Confirm.view.tsx (2 hunks)
  • src/components/Create/Link/Initial.view.tsx (2 hunks)
  • src/components/CrispChat.tsx (1 hunks)
  • src/components/Global/KYCComponent/index.tsx (2 hunks)
  • src/components/Global/TokenSelector/TokenSelector.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • src/components/Cashout/Components/Confirm.view.tsx
  • src/components/Cashout/Components/Faq.comp.tsx
  • src/components/Claim/Link/Initial.view.tsx
  • src/components/Claim/Link/Offramp/Confirm.view.tsx
  • src/components/Create/Link/Initial.view.tsx
  • src/components/CrispChat.tsx
  • src/components/Global/KYCComponent/index.tsx
  • src/components/Global/TokenSelector/TokenSelector.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (19)
src/components/CrispChat.tsx (3)

3-7: LGTM! Consider adding type definitions for window.$crisp.

The openCrispChat function is implemented correctly. It properly checks for the existence of window.$crisp before using it, which is a good practice to avoid runtime errors.

To improve type safety and maintainability, consider adding type definitions for window.$crisp.

You can add the following type definition at the top of the file:

declare global {
  interface Window {
    $crisp?: {
      push: (args: any[]) => void;
    };
  }
}

This will provide better TypeScript support and autocompletion for the $crisp object.


9-15: LGTM! Consider memoizing the onClick handler.

The ChatWithSupport component is well-implemented. It correctly spreads the rest of the props to the button element, sets the onClick handler to openCrispChat, and renders the children prop inside the button.

For a minor optimization, consider memoizing the onClick handler to prevent unnecessary re-renders.

You can optimize the component like this:

import React from 'react';

export const ChatWithSupport = React.memo(({ children, ...rest }: React.HTMLAttributes<HTMLButtonElement>) => {
    const handleClick = React.useCallback(() => {
        openCrispChat();
    }, []);

    return (
        <button {...rest} onClick={handleClick}>
            {children}
        </button>
    );
});

ChatWithSupport.displayName = 'ChatWithSupport';

This optimization ensures that the onClick handler is not recreated on every render, which can be beneficial for performance in certain scenarios.


1-1: Great file structure! Consider adding React imports.

The file has a clear structure with each exported entity serving a distinct purpose. To ensure compatibility with stricter TypeScript configurations and to make the React usage explicit, consider adding the following imports at the top of the file:

import React from 'react';

This import will make the React usage explicit and prevent potential issues with stricter TypeScript configurations.

src/components/Cashout/Components/Faq.comp.tsx (2)

35-37: LGTM: ChatWithSupport component implementation looks good.

The ChatWithSupport component is correctly implemented and placed within the FAQ dropdown. The styling and text content are appropriate for a support link.

Consider adding an aria-label to the ChatWithSupport component to improve accessibility. For example:

- <ChatWithSupport className="mt-2 text-blue-600 underline">
+ <ChatWithSupport className="mt-2 text-blue-600 underline" aria-label="Open chat support">
    Need help? Chat with support
  </ChatWithSupport>

This will provide more context for screen reader users.


Line range hint 1-37: Summary: Successful integration of ChatWithSupport component

The changes in this file effectively replace the previous support chat button with the new ChatWithSupport component. This modification aligns well with the PR objectives and maintains the overall structure and functionality of the FAQComponent. The implementation is clean and should provide a seamless transition for users accessing support.

To further improve the component:

  1. Consider adding error handling within the ChatWithSupport component to gracefully handle any issues with the Crisp chat service.
  2. If not already implemented, add analytics tracking to measure the usage and effectiveness of this new support chat feature.
src/components/Create/Link/Initial.view.tsx (2)

Line range hint 52-77: LGTM! Consider refactoring for DRY principle.

The addition of specific error handling for unsupported cryptocurrencies (Solana, Bitcoin, Litecoin, and Tron) improves user feedback and aligns with the PR objective of enhancing error handling. The error messages are clear and informative.

Consider refactoring the repeated code blocks for each unsupported cryptocurrency to reduce duplication. Here's a suggested approach:

const unsupportedCryptos = [
  { symbol: 'sol', name: 'Solana' },
  { symbol: 'btc', name: 'Bitcoin' },
  { symbol: 'ltc', name: 'Litecoin' },
  { symbol: 'trx', name: 'Tron' }
];

for (const crypto of unsupportedCryptos) {
  if (validate(value, crypto.symbol)) {
    setErrorState({
      showError: true,
      errorMessage: `We currently don't support ${crypto.name}. Reach out if you would like us to add support!`,
    });
    return undefined;
  }
}

This refactored version maintains the same functionality while reducing code duplication and making it easier to add or remove unsupported cryptocurrencies in the future.


271-273: LGTM! Consider improving conditional rendering logic.

The replacement of the Discord link with the ChatWithSupport component aligns well with the PR objective. The conditional rendering for specific error cases is a good UX decision.

Consider extracting the condition for showing the ChatWithSupport component into a separate variable for improved readability:

const showSupportChat = errorState.errorMessage.includes('We currently dont support ');

{errorState.showError && (
  <>
    <div className="w-full text-center">
      <label className=" text-h8 font-normal text-red ">{errorState.errorMessage}</label>
    </div>
    {showSupportChat && (
      <ChatWithSupport className="btn h-8 w-full cursor-pointer px-2">Reach out!</ChatWithSupport>
    )}
  </>
)}

This change would make the condition more explicit and easier to modify if needed in the future.

src/components/Welcome/welcome.tsx (2)

Line range hint 1-391: Consider refactoring for improved maintainability.

The Welcome component is quite large and handles multiple responsibilities. Consider breaking it down into smaller, more focused components (e.g., LogoCloud, FAQ, Testimonials) to improve maintainability and reusability.

Here's a high-level suggestion for refactoring:

// LogoCloud.tsx
const LogoCloud = () => {
  // ... logo cloud logic and JSX
};

// FAQ.tsx
const FAQ = () => {
  // ... FAQ logic and JSX
};

// Testimonials.tsx
const Testimonials = () => {
  // ... testimonials logic and JSX
};

// Welcome.tsx
export function Welcome() {
  return (
    <div className="flex w-full flex-col items-center justify-center dark:bg-black">
      {/* ... other JSX */}
      <LogoCloud />
      <FAQ />
      <Testimonials />
      {/* ... other JSX */}
    </div>
  );
}

This refactoring would make the Welcome component more manageable and easier to maintain.


Missing Crisp integration in Welcome component.

The Welcome component (src/components/Welcome/welcome.tsx) does not show the replacement of reach out CTAs with Crisp buttons. It appears that these changes are either not implemented in this component or are pending.

🔗 Analysis chain

Line range hint 1-391: Verify alignment with PR objectives.

The PR title mentions replacing reach out CTAs with crisp buttons, but there are no visible changes related to this in the Welcome component. Could you clarify if these changes are implemented elsewhere or if they're still pending?

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any crisp-related changes or additions in the codebase
rg --type typescript --type javascript -i 'crisp|chat.?with.?support'

Length of output: 106


Script:

#!/bin/bash
# Search for any crisp-related changes or additions in the codebase
rg --type ts --type js -i 'crisp|chat.?with.?support'

Length of output: 4439

src/components/Claim/Link/Offramp/Confirm.view.tsx (2)

348-351: LGTM: Improved error handling for KYC under review.

The changes effectively replace the Discord link with a direct chat option, improving the user experience. The error message is clear and actionable.

Consider wrapping the entire message in a single JSX element for better readability:

<div className="text-center">
  <p className="text-h8 font-normal text-red">
    KYC is under review, we might need additional documents. Chat with support to finish the process.
  </p>
  <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
</div>

355-356: LGTM: Improved error handling for KYC rejected.

The changes consistently implement the direct chat option for the KYC rejected scenario, aligning with the PR objective.

For consistency with the previous error message, consider wrapping the content in a <p> tag:

<div className="text-center">
  <p className="text-h8 font-normal text-red">
    KYC has been rejected.{' '}
    <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
  </p>
</div>

This structure would make both error messages more consistent in their HTML structure.

src/components/Global/TokenSelector/TokenSelector.tsx (1)

333-335: LGTM: Replacement of Discord link with ChatWithSupport component.

The ChatWithSupport component is correctly implemented, replacing the previous Discord link for custom token requests. This change aligns well with the PR objective.

Consider adding an aria-label to enhance accessibility, especially since the component is likely interactive:

-<ChatWithSupport className="cursor-pointer text-center text-h8 font-normal underline">
+<ChatWithSupport className="cursor-pointer text-center text-h8 font-normal underline" aria-label="Chat with support to add a custom token">
src/components/Cashout/Components/Confirm.view.tsx (2)

538-541: Improved error handling for KYC under review.

The error message has been updated to provide more specific information about the KYC review process, and the ChatWithSupport component has been integrated to allow users to easily initiate a chat with support. This change aligns well with the PR objective.

Consider wrapping the entire message in a single JSX element for better structure:

-                        <label className=" text-h8 font-normal text-red ">
-                            KYC is under review, we might need additional documents. Chat with support to finish the
-                            process.
-                        </label>
-                        <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
+                        <div>
+                            <label className="text-h8 font-normal text-red">
+                                KYC is under review, we might need additional documents. Chat with support to finish the process.
+                            </label>
+                            <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
+                        </div>

545-546: Improved error handling for KYC rejection.

The error message has been updated to inform users about KYC rejection, and the ChatWithSupport component has been integrated to allow users to easily initiate a chat with support. This change aligns well with the PR objective.

For consistency with the previous error message, consider wrapping the entire message in a single JSX element and adding more context:

-                        <label className=" text-h8 font-normal text-red ">KYC has been rejected.</label>
-                        <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
+                        <div>
+                            <label className="text-h8 font-normal text-red">
+                                KYC has been rejected. Chat with support for more information and next steps.
+                            </label>
+                            <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
+                        </div>
src/components/Claim/Link/Initial.view.tsx (3)

615-618: LGTM: Improved error handling with ChatWithSupport integration

The integration of the ChatWithSupport component in the error message for offramp unavailability is a good improvement. It provides a more interactive way for users to seek assistance when they encounter this specific error.

Consider adding an aria-label to the ChatWithSupport component for better accessibility. For example:

- <ChatWithSupport className="text-blue-600 underline">
+ <ChatWithSupport className="text-blue-600 underline" aria-label="Open chat support for offramp unavailability">

647-648: LGTM: Enhanced user support for unsupported accounts

The integration of the ChatWithSupport component in the message for unsupported accounts is a good improvement. It provides users with an easy way to get more information about account support.

For consistency with the previous usage, consider changing the text to "Chat with support" instead of "Reach out". This would provide a more uniform user experience throughout the application. For example:

- <ChatWithSupport className="mr-1 underline">Reach out</ChatWithSupport>
+ <ChatWithSupport className="mr-1 underline">Chat with support</ChatWithSupport>

Also, consider adding an aria-label here as well for improved accessibility.


22-22: Overall: Good improvements to user support interaction

The integration of the ChatWithSupport component throughout this file significantly enhances the user experience by providing more interactive support options. These changes are particularly beneficial in error scenarios and for users with unsupported accounts.

The implementation is clean and consistent, with only minor suggestions for improvement in terms of accessibility and text consistency.

Consider creating a custom wrapper component for ChatWithSupport that includes the common styling (underline, text color) and accessibility features (aria-label). This would further improve consistency and make it easier to update the component's appearance and behavior across the application in the future.

Also applies to: 615-618, 647-648

src/components/Global/KYCComponent/index.tsx (2)

381-382: Improve the KYC under review message for clarity

Consider rephrasing the message to enhance readability and provide clearer guidance to the user.

Apply this diff to update the message:

-                                    KYC is under review, we might need additional documents. Chat with support to finish the
-                                    process.
+                                    Your KYC is under review, and we might need additional documents. Please chat with support to complete the process.

388-389: Enhance the KYC rejection message for user clarity

Consider rewording the message to be more user-friendly and provide next steps.

Apply this diff to update the message:

-                                <label className=" text-h8 font-normal text-red ">KYC has been rejected.</label>
-                                <ChatWithSupport className="text-blue-600 underline">Chat with support</ChatWithSupport>
+                                <label className=" text-h8 font-normal text-red ">Your KYC has been rejected. Please chat with support for assistance.</label>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 63a0d62 and 7d4a1f8.

📒 Files selected for processing (10)
  • global.d.ts (1 hunks)
  • src/components/Cashout/Components/Confirm.view.tsx (2 hunks)
  • src/components/Cashout/Components/Faq.comp.tsx (2 hunks)
  • src/components/Claim/Link/Initial.view.tsx (3 hunks)
  • src/components/Claim/Link/Offramp/Confirm.view.tsx (2 hunks)
  • src/components/Create/Link/Initial.view.tsx (2 hunks)
  • src/components/CrispChat.tsx (1 hunks)
  • src/components/Global/KYCComponent/index.tsx (2 hunks)
  • src/components/Global/TokenSelector/TokenSelector.tsx (2 hunks)
  • src/components/Welcome/welcome.tsx (1 hunks)
🔇 Additional comments (12)
global.d.ts (1)

1-3: Approve with suggestions for improvement

The addition of the $crisp property to the global Window interface allows for its usage throughout the codebase, which aligns with the PR objective of replacing reach out CTAs with crisp buttons. However, there are a few points to consider:

  1. Type safety: Using any for the $crisp property type sacrifices type safety. If possible, consider using a more specific type that accurately represents the structure of the Crisp chat object. This will provide better autocomplete suggestions and catch potential type-related errors at compile-time.

  2. Documentation: It would be helpful to add a brief comment explaining the purpose of this property and its relationship to the Crisp chat integration. This will help other developers understand its usage and importance.

Consider updating the code as follows:

interface Window {
  /**
   * Crisp chat integration object.
   * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/
   */
  $crisp: CrispChat; // Replace 'CrispChat' with the actual type if available
}

Let's verify the usage of this property in the codebase:

This will help ensure that the property is being used consistently and correctly throughout the project.

✅ Verification successful

Correcting the shell script to search for $crisp usages

The previous script used unrecognized file types. Let's update the file type flags and rerun the search to ensure all relevant files are checked:


Updating the search command to correctly find $crisp usages

The previous script encountered issues with unrecognized file types. Let's adjust the search by specifying file extensions directly using the --glob flag:


Verified usage of $crisp in the codebase

The property window.$crisp is correctly utilized in src/components/CrispChat.tsx, confirming that the Crisp chat integration is implemented as intended.

  • Type Safety: Consider defining a more specific type for $crisp to enhance type safety and provide better autocomplete support.
  • Documentation: Add comments to global.d.ts explaining the purpose of $crisp and its role in the Crisp integration.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usages of window.$crisp
rg '\$crisp' --type typescript --type javascript

Length of output: 85


Script:

#!/bin/bash
# Corrected search for usages of window.$crisp
rg '\$crisp' --type ts --type tsx --type js --type jsx

Length of output: 84


Script:

#!/bin/bash
# Corrected search for usages of window.$crisp using glob patterns
rg '\$crisp' --glob '*.{ts,tsx,js,jsx}'

Length of output: 256

src/components/Cashout/Components/Faq.comp.tsx (1)

1-1: LGTM: New import statement is correct.

The import statement for ChatWithSupport is properly formatted and follows React conventions.

src/components/Create/Link/Initial.view.tsx (2)

Line range hint 1-275: Overall, the changes look good and align with the PR objectives.

The modifications to this file enhance error handling, improve user feedback for unsupported cryptocurrencies, and integrate the new ChatWithSupport component effectively. These changes contribute to a better user experience and align well with the goal of replacing reach out CTAs with crisp buttons.

A few minor suggestions have been made for potential improvements:

  1. Verifying unused imports
  2. Refactoring the unsupported cryptocurrency checks for better maintainability
  3. Improving the readability of the conditional rendering logic for the support chat

Great job on these enhancements!


13-13: LGTM! Verify unused imports.

The new imports for ethers and ChatWithSupport align with the component's functionality and PR objectives. The removal of parsePhoneNumberFromString and peanut SDK imports suggests changes in phone number handling or SDK usage.

Please run the following script to check for any unused imports:

Also applies to: 17-17

src/components/Welcome/welcome.tsx (1)

139-139: LGTM: Removed extra whitespace in className.

The removal of the extra space in the className is a good cleanup. It improves code readability without affecting functionality.

src/components/Claim/Link/Offramp/Confirm.view.tsx (2)

17-17: LGTM: New import for ChatWithSupport component.

The import of ChatWithSupport from '@/components/CrispChat' is correctly placed and aligns with the PR objective of replacing reach out CTAs with Crisp buttons.


17-17: Summary: Successful implementation of Crisp chat support.

The changes effectively replace the previous Discord links with direct chat options using the ChatWithSupport component. This improvement aligns well with the PR objective and enhances the user experience by providing immediate support access. The implementation is consistent across different error scenarios.

Key improvements:

  1. Added import for ChatWithSupport component.
  2. Updated error messages for both "KYC under review" and "KYC rejected" scenarios.
  3. Implemented clickable chat options for users to easily reach support.

These changes should positively impact user engagement and support accessibility.

Also applies to: 348-351, 355-356

src/components/Global/TokenSelector/TokenSelector.tsx (2)

19-19: LGTM: New import for ChatWithSupport component.

The import statement for the ChatWithSupport component is correctly added and aligns with the PR objective of replacing reach out CTAs with crisp buttons.


Line range hint 1-341: Summary: Successful integration of ChatWithSupport component.

The changes in this file effectively implement the PR objective of replacing the Discord link with a Crisp chat button. The integration is minimal and focused, maintaining the overall structure and functionality of the TokenSelector component. The new ChatWithSupport component is well-placed and doesn't introduce any complexity or require changes to the existing logic.

A few points to note:

  1. Ensure that the ChatWithSupport component is thoroughly tested, especially its interaction with the modal and its behavior when clicked.
  2. Verify that the Crisp chat functionality is properly set up and configured to handle custom token requests effectively.
  3. Consider updating any relevant documentation or user guides to reflect this change in the support process for custom token requests.

Overall, these changes enhance the user experience by providing a more direct and integrated support option.

To ensure the ChatWithSupport component is correctly implemented across the application, run the following script:

src/components/Cashout/Components/Confirm.view.tsx (1)

20-20: New import for ChatWithSupport component added.

The import for the ChatWithSupport component has been correctly added. This aligns with the PR objective of replacing reach out CTAs with crisp buttons.

src/components/Claim/Link/Initial.view.tsx (1)

22-22: LGTM: New ChatWithSupport component imported correctly

The import statement for the new ChatWithSupport component is properly placed and uses a named import, which is a good practice for maintainability and clarity.

src/components/Global/KYCComponent/index.tsx (1)

16-16: Import statement for 'ChatWithSupport' component is correct

The import statement correctly includes the ChatWithSupport component from the specified path.

Copy link
Contributor

@Hugo0 Hugo0 left a comment

Choose a reason for hiding this comment

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

This is great! Very nice. Merging 🥳

@coderabbitai coderabbitai bot mentioned this pull request Mar 12, 2025
@Hugo0 Hugo0 deleted the feat/replace-react-out-w-crisp branch July 3, 2025 18:21
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.

2 participants