Skip to content

Conversation

Zishan-7
Copy link
Contributor

@Zishan-7 Zishan-7 commented Sep 8, 2025

image

@Zishan-7 Zishan-7 requested a review from Hugo0 September 8, 2025 16:20
Copy link
Contributor

coderabbitai bot commented Sep 8, 2025

Walkthrough

The Profile component hides the “Bank accounts” menu item by commenting it out and adding a note indicating it will be enabled with the Account Management project. No other structural or API changes were made.

Changes

Cohort / File(s) Summary
Profile menu item adjustment
src/components/Profile/index.tsx
Commented out the Bank accounts <ProfileMenuItem /> and added a note about enabling it with the Account Management project; no other changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

enhancement

Suggested reviewers

  • Hugo0
  • kushagrasarathe
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/remove-bank-acc-btn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Manage acccounts fix

Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Sep 8, 2025 4:25pm

@coderabbitai coderabbitai bot added the enhancement New feature or request label Sep 8, 2025
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

🧹 Nitpick comments (2)
src/components/Profile/index.tsx (2)

56-63: Prefer a feature flag over commented-out JSX

Use a build-time env flag to toggle rendering instead of keeping dead code in comments.

Apply this diff within the changed block:

-                        {/* Enable with Account Management project. */}
-                        {/* <ProfileMenuItem
-                            icon="bank"
-                            label="Bank accounts"
-                            href="https://github.com/profile/bank-accounts"
-                            position="middle"
-                            comingSoon
-                        /> */}
+                        {/* Account Management (controlled by NEXT_PUBLIC_FEATURE_ACCOUNT_MGMT) */}
+                        {ACCOUNT_MGMT_ENABLED && (
+                            <ProfileMenuItem
+                                icon="bank"
+                                label="Bank accounts"
+                                href="https://github.com/profile/bank-accounts"
+                                position="middle"
+                            />
+                        )}

And add the flag in this component (near other consts):

const ACCOUNT_MGMT_ENABLED =
  process.env.NEXT_PUBLIC_FEATURE_ACCOUNT_MGMT === 'true'

56-56: Make the comment actionable

Reference a tracker/ticket so re-enabling doesn’t get lost.

-                        {/* Enable with Account Management project. */}
+                        {/* TODO(ACCOUNT-MGMT-<ticket>): Enable with Account Management project. */}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 665e4ce and 8ea6401.

📒 Files selected for processing (1)
  • src/components/Profile/index.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy-Preview
🔇 Additional comments (2)
src/components/Profile/index.tsx (2)

56-63: LGTM: Bank accounts button removed as requested

Commenting out the item achieves the PR goal without affecting the rest of the group styling (“first” + “last” still render correctly with two items).


56-63: No blocking or test updates required for bank accounts menu item
No /profile/bank-accounts route or related UI/E2E tests were found in the codebase; no additional guards or test adjustments are needed.

@Zishan-7 Zishan-7 merged commit ad7bfef into peanut-wallet Sep 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants