profile link to mobile menu#2063
Conversation
📝 WalkthroughWalkthroughThis pull request adds a new "Profile" navigation item to the bottom navigation bar with associated profile routing logic. Changes include a new ProfileIcon component, integration into BottomNavigation, enhanced NavItem with wallet connection flow handling, and comprehensive test coverage for the new functionality. Changes
Sequence DiagramsequenceDiagram
actor User
participant NavItem as NavItem Component
participant SeizeConnect as SeizeConnect Context
participant Navigation as Router/Navigation
User->>NavItem: Click Profile item
NavItem->>SeizeConnect: Check if wallet address connected
alt No wallet connected
SeizeConnect-->>NavItem: address is null
NavItem->>SeizeConnect: Trigger seizeConnect()
SeizeConnect-->>User: Show wallet connection modal
else Wallet connected
SeizeConnect-->>NavItem: Return address + profile slug
NavItem->>Navigation: Navigate to profile href
Navigation-->>User: Display profile page
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/navigation/NavItem.tsx`:
- Around line 46-51: The code currently uses the nullish coalescing operator
when deriving normalizedConnectedHandle and profileSlug so an empty string
handle blocks fallback to the address; update the logic in NavItem (symbols:
connectedProfile.normalised_handle / connectedProfile.handle,
normalizedConnectedHandle, normalizedConnectedAddress, profileSlug, profileHref)
to treat empty-string handles as absent (e.g., use a falsy check or explicit
length check instead of ??) so that when the handle is "" the code falls back to
normalizedConnectedAddress and builds profileHref from the address.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ddc057be-5bb7-481f-a2fc-f32ed713af94
📒 Files selected for processing (5)
__tests__/components/navigation/BottomNavigation.test.tsx__tests__/components/navigation/NavItem.test.tsxcomponents/common/icons/ProfileIcon.tsxcomponents/navigation/BottomNavigation.tsxcomponents/navigation/NavItem.tsx
|



Summary by CodeRabbit