0% found this document useful (0 votes)
30 views1 page

Cursor KYC Prompt

The document outlines a set of requirements for a KYC error modal on a Dashboard page. It specifies making a GET request to check KYC status and displaying a modal with error details if resubmission is required. The modal should include a close button and a redirect button, styled with Tailwind CSS, and should only appear once on page load using React hooks.

Uploaded by

moin latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Cursor KYC Prompt

The document outlines a set of requirements for a KYC error modal on a Dashboard page. It specifies making a GET request to check KYC status and displaying a modal with error details if resubmission is required. The modal should include a close button and a redirect button, styled with Tailwind CSS, and should only appear once on page load using React hooks.

Uploaded by

moin latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Cursor Prompt for KYC Error Modal

I want you to do the following in my Dashboard page:

1. When the user visits `/dashboard`, make a GET request to:


http://localhost:3000/stripe/check-kyc/:id
The `:id` should be dynamically taken from `localStorage.getItem("stripeAccountId")`.

2. If the API response contains:


{
"status": "requires_resubmission",
"errors": [ ... ]
}
Then show a **modal** at the top center of the screen.

3. The modal should:


- Have a close button (×) on the top-left.
- Show the first error’s `reason` from `response.data.errors[0].reason`.
- Have a button labeled `Resubmit Documents`.

4. When the button is clicked, redirect the user to:


/resubmit-kyc

5. Use Tailwind CSS for modal styles:


- Fixed at top center
- White background, rounded corners, shadow, padding
- Modal width: around 350–400px
- z-index should be high enough (z-50)
- Show only once on page load

6. Don’t use any third-party modal library. Use React hooks like `useState` and `useEffect`.

7. Ignore resubmit-kyc page implementation for now.

You might also like