-
Notifications
You must be signed in to change notification settings - Fork 615
[MNY-252] Dashboard: Update WalletAddress component UI #8276
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
WalkthroughSplit WalletAddress into a data-fetching wrapper and a presentation component, moved social-profile fetching into the wrapper, replaced clipboard logic with CopyTextButton, added a Storybook story for multiple states, and disabled React Query retries in useSocialProfiles. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WalletAddress
participant useSocialProfiles
participant WalletAddressUI
participant Browser
User->>WalletAddress: provide address & client
WalletAddress->>useSocialProfiles: request profiles
useSocialProfiles-->>WalletAddress: return { data, isPending }
WalletAddress->>WalletAddressUI: pass address, client, profiles
alt profiles.isPending
WalletAddressUI->>Browser: render loading skeletons
else profiles.data.length > 0
WalletAddressUI->>Browser: render profiles (avatar, name, type)
else
WalletAddressUI->>Browser: render "No profiles found"
end
Browser->>User: display WalletAddress UI
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Pre-merge checks and finishing touches❌ Failed checks (3 warnings, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
size-limit report 📦
|
9c729dc to
c6b15ef
Compare
ca88051 to
db291d2
Compare
c6b15ef to
832d5ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
57-64: Requirement mismatch: “never truncate” — stop shortening and remove CSS ellipsis.Address is still sliced and visually truncated. Show the full address everywhere (including zero address), and allow wrapping instead of ellipsis.
- const [shortenedAddress, _lessShortenedAddress] = useMemo(() => { - return [ - props.shortenAddress !== false - ? `${address.slice(0, 6)}...${address.slice(-4)}` - : address, - `${address.slice(0, 14)}...${address.slice(-12)}`, - ]; - }, [address, props.shortenAddress]); + // Dashboard requirement: always show full address (no truncation) + const displayAddress = address; @@ if (address === ZERO_ADDRESS) { return ( <div className="flex items-center gap-2 py-2"> <CircleSlashIcon className={cn("size-5 text-muted-foreground/70", props.iconClassName)} /> <span - className={cn("cursor-pointer font-mono text-sm", props.className)} + className={cn("cursor-pointer font-mono text-sm break-all", props.className)} > - {shortenedAddress} + {displayAddress} </span> </div> ); } @@ - <Button + <Button className={cn( - "flex flex-row items-center gap-2 px-0 max-w-full truncate", + "flex flex-row items-center gap-2 px-0 max-w-full", props.className, )} onClick={(e) => e.stopPropagation()} variant="link" > @@ - <span className="cursor-pointer font-mono max-w-full truncate"> - {props.profiles.data?.[0]?.name || shortenedAddress} + <span className="cursor-pointer font-mono break-all"> + {displayAddress} </span>Based on objectives.
Also applies to: 82-91, 100-106, 115-117
🧹 Nitpick comments (2)
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx (1)
7-16: Meta.component is set to the Story wrapper; consider pointing to WalletAddressUI for better autodocs/controls.Non-blocking, but using the component improves args tables and controls.
-const meta = { - component: Story, +const meta = { + component: WalletAddressUI, parameters: { nextjs: { appDirectory: true }, }, title: "blocks/WalletAddress", } satisfies Meta<typeof Story>;apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
156-163: Key stability for mapped profiles.
key={profile.type + profile.name}can collide whennameis undefined or repeated. Prefer a more stable key.- <div - className="flex flex-row items-center gap-3 py-2" - key={profile.type + profile.name} - > + <div + className="flex flex-row items-center gap-3 py-2" + key={`${profile.type}:${profile.name ?? profile.avatar ?? profile.bio ?? Math.random()}`} + >Alternatively, include an index as a suffix if no unique field is guaranteed.
Also applies to: 174-179
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx(1 hunks)apps/dashboard/src/@/components/blocks/wallet-address.tsx(3 hunks)packages/thirdweb/src/react/core/social/useSocialProfiles.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
packages/thirdweb/src/react/core/social/useSocialProfiles.tsapps/dashboard/src/@/components/blocks/wallet-address.tsxapps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/react/core/social/useSocialProfiles.tsapps/dashboard/src/@/components/blocks/wallet-address.tsxapps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/react/core/social/useSocialProfiles.ts
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/*(Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
UseNavLinkfor internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()from@/lib/utilsfor conditional class logic
Use design system tokens (e.g.,bg-card,border-border,text-muted-foreground)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()to retrieve JWT from cookies on server side
UseAuthorization: Bearerheader – never embed tokens in URLs
Return typed results (e.g.,Project[],User[]) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stablequeryKeysfor React Query cache hits
ConfigurestaleTime/cacheTimein React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-jsin server components
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsxapps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
apps/{dashboard,playground}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/_(e.g., Button, Input, Tabs, Card)
UseNavLinkfor internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names withcn()from@/lib/utilsfor conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start withimport "server-only"; usenext/headers, server‑only env, heavy data fetching, andredirect()where appropriate
Client Components must start with'use client'; handle interactivity with hooks and browser APIs
Server-side data fetching: callgetAuthToken()from cookies, sendAuthorization: Bearer <token>header, and return typed results (avoidany)
Client-side data fetching: wrap calls in React Query with descriptive, stablequeryKeysand set sensiblestaleTime/cacheTime(≥ 60s default); keep tokens secret via internal routes or server actions
Do not importposthog-jsin server components (client-side only)
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsxapps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
apps/{dashboard,playground}/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Expose a
classNameprop on the root element of every component
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsxapps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
**/*.stories.tsx
📄 CodeRabbit inference engine (CLAUDE.md)
For new UI components, add Storybook stories (
*.stories.tsx) alongside the code
Files:
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
apps/{dashboard,playground}/**/*.stories.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Add Storybook stories (
*.stories.tsx) alongside new UI components
Files:
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
🧠 Learnings (2)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to apps/{dashboard,playground}/**/*.stories.tsx : Add Storybook stories (`*.stories.tsx`) alongside new UI components
Applied to files:
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.{stories,test}.{tsx,ts} : Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.
Applied to files:
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (4)
apps/nebula/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress(20-173)packages/thirdweb/src/react/core/social/useSocialProfiles.ts (1)
useSocialProfiles(24-42)apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)
CopyTextButton(9-68)apps/playground-web/src/app/ai/components/resolveSchemeWithErrorHandler.ts (1)
resolveSchemeWithErrorHandler(4-21)
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx (2)
packages/ui/src/storybook/utils.tsx (1)
BadgeContainer(14-24)apps/dashboard/src/@/components/blocks/wallet-address.tsx (2)
WalletAddressUI(46-190)WalletAddress(29-44)
⏰ 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). (2)
- GitHub Check: Unit Tests
- GitHub Check: Size
🔇 Additional comments (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
17-19: UI polish: Skeleton import is local; ensure consistent UI primitive usage.Looks good—using our shared Skeleton in Dashboard meets the design system guidance.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8276 +/- ##
=======================================
Coverage 54.90% 54.90%
=======================================
Files 919 919
Lines 60622 60622
Branches 4116 4118 +2
=======================================
Hits 33282 33282
- Misses 27239 27240 +1
+ Partials 101 100 -1
🚀 New features to boost your workflow:
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the `WalletAddress` component and its UI by improving the handling of social profiles, adding new story variants, and refining the UI elements for better user experience.
### Detailed summary
- Changed `retry` in `useSocialProfiles` from `3` to `false`.
- Added new Storybook stories for `WalletAddress` and `WalletAddressUI`.
- Introduced a `Skeleton` component for loading states.
- Refactored `WalletAddress` to use `useSocialProfiles` directly.
- Updated UI structure and styling for displaying social profiles.
- Improved the handling of address display and copy functionality.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added Storybook examples showcasing Wallet Address states (loaded, loading, empty, invalid, zero address, ENS)
* **Refactor**
* Split wallet address UI for clearer rendering and moved profile-driven rendering to a dedicated UI component
* Updated copy button styling to use a unified copy control
* Improved social profiles panel layout and presentation
* **Bug Fixes / Behavior**
* Adjusted profile loading behavior to avoid automatic retry on failure, surfacing empty/error states sooner
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
da718f9 to
1e7df5a
Compare
Merge activity
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
57-64: Address truncation contradicts PR objective.The PR objective explicitly states: "show full address (do not truncate)" with a directive from @jake: "never truncate." However, the code still truncates by default when
shortenAddressis undefined ortrue.If the objective is to never truncate, consider either:
- Changing the default to
shortenAddress === true(opt-in truncation), or- Removing the
shortenAddressprop entirely and always showing the full addressApply this diff to default to showing the full address:
return [ - props.shortenAddress !== false + props.shortenAddress === true ? `${address.slice(0, 6)}...${address.slice(-4)}` : address, `${address.slice(0, 14)}...${address.slice(-12)}`, ];
♻️ Duplicate comments (4)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (3)
97-97: Keyboard accessibility: button is unfocusable.This issue was already flagged in a previous review.
tabIndex={-1}on theHoverCardTriggermakes the button unfocusable for keyboard users, preventing them from opening the HoverCard via keyboard navigation.
36-43: Error state not surfaced to UI.This issue was already flagged in a previous review. The wrapper only passes
dataandisPendingtoWalletAddressUI, droppingisErroranderror. With retries now disabled inuseSocialProfiles, transient failures will appear as "No profiles found" instead of showing an error state.
144-148: Error state indistinguishable from empty state.This issue was already flagged in a previous review. The UI only checks
isPendingand emptydata, but doesn't render an error state when profile fetching fails. Users will see "No profiles found" for both actual empty results and network failures.packages/thirdweb/src/react/core/social/useSocialProfiles.ts (1)
40-40: Disabling retries violates coding guidelines and degrades UX.This change is already flagged in a previous review. Setting
retry: falsecauses transient network failures to immediately surface as empty data, and with error state not being surfaced in the UI (see wallet-address.tsx), users will see "No profiles found" on temporary network issues.Additionally, this violates the coding guidelines which require configuring
staleTime/cacheTimein React Query (default ≥ 60s).As per coding guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx(1 hunks)apps/dashboard/src/@/components/blocks/wallet-address.tsx(3 hunks)packages/thirdweb/src/react/core/social/useSocialProfiles.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/dashboard/src/@/components/blocks/wallet-address.stories.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsxpackages/thirdweb/src/react/core/social/useSocialProfiles.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsxpackages/thirdweb/src/react/core/social/useSocialProfiles.ts
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/*(Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
UseNavLinkfor internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()from@/lib/utilsfor conditional class logic
Use design system tokens (e.g.,bg-card,border-border,text-muted-foreground)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()to retrieve JWT from cookies on server side
UseAuthorization: Bearerheader – never embed tokens in URLs
Return typed results (e.g.,Project[],User[]) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stablequeryKeysfor React Query cache hits
ConfigurestaleTime/cacheTimein React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-jsin server components
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
apps/{dashboard,playground}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/_(e.g., Button, Input, Tabs, Card)
UseNavLinkfor internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names withcn()from@/lib/utilsfor conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start withimport "server-only"; usenext/headers, server‑only env, heavy data fetching, andredirect()where appropriate
Client Components must start with'use client'; handle interactivity with hooks and browser APIs
Server-side data fetching: callgetAuthToken()from cookies, sendAuthorization: Bearer <token>header, and return typed results (avoidany)
Client-side data fetching: wrap calls in React Query with descriptive, stablequeryKeysand set sensiblestaleTime/cacheTime(≥ 60s default); keep tokens secret via internal routes or server actions
Do not importposthog-jsin server components (client-side only)
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsx
apps/{dashboard,playground}/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Expose a
classNameprop on the root element of every component
Files:
apps/dashboard/src/@/components/blocks/wallet-address.tsx
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/react/core/social/useSocialProfiles.ts
🧬 Code graph analysis (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (3)
packages/thirdweb/src/react/core/social/useSocialProfiles.ts (1)
useSocialProfiles(24-42)apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)
CopyTextButton(9-68)apps/playground-web/src/app/ai/components/resolveSchemeWithErrorHandler.ts (1)
resolveSchemeWithErrorHandler(4-21)
⏰ 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). (8)
- GitHub Check: Lint Packages
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Unit Tests
- GitHub Check: Build Packages
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (2)
131-138: Good refactor to use shared CopyTextButton.Replacing inline clipboard logic with the reusable
CopyTextButtoncomponent improves consistency and maintainability.
150-183: Profile rendering logic is well-structured.The profile mapping and avatar resolution logic is clean and handles edge cases appropriately with the error handler.
| }) { | ||
| }; | ||
|
|
||
| export function WalletAddress(props: WalletAddressProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add explicit return types to exported functions.
Both WalletAddress and WalletAddressUI are missing explicit return types. Coding guidelines require explicit return types for all function declarations in TypeScript.
Apply this diff:
-export function WalletAddress(props: WalletAddressProps) {
+export function WalletAddress(props: WalletAddressProps): JSX.Element { export function WalletAddressUI(
props: WalletAddressProps & {
profiles: {
data: SocialProfile[];
isPending: boolean;
};
},
-) {
+): JSX.Element {As per coding guidelines.
Also applies to: 46-46
🤖 Prompt for AI Agents
In apps/dashboard/src/@/components/blocks/wallet-address.tsx around lines 29 and
46, the exported functions WalletAddress and WalletAddressUI lack explicit
return types; add explicit TypeScript return annotations (e.g., : JSX.Element or
: React.ReactElement) to both function declarations so they conform to the
coding guideline for exported functions, ensuring imports for React types exist
if needed.

PR-Codex overview
This PR focuses on enhancing the
WalletAddressandWalletAddressUIcomponents by improving their handling of social profiles, updating props, and modifying the UI for better user experience.Detailed summary
retryoption inuseSocialProfilesfrom3tofalse.WalletAddressandWalletAddressUI.WalletAddressto useuseSocialProfilesdirectly.WalletAddressUIto acceptprofilesas props.Summary by CodeRabbit
New Features
Refactor
Bug Fixes / Behavior