Skip to content

[Frontend] Inconsistent cn() helper: ui/Button.tsx, ui/Card.tsx and ui/EmptyState.tsx redefine a local cn() instead of importing the shared @/app/utils/cn #1248

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

A shared helper exists at frontend/src/app/utils/cn.ts (clsx + tailwind-merge) and is imported by ui/Input.tsx and ui/Modal.tsx. But ui/Button.tsx (line 8), ui/Card.tsx (line 8) and ui/EmptyState.tsx (line 9) each copy-paste an identical local function cn(...). This is duplicated logic within the same design-system folder that should use one source of truth.

Acceptance criteria

  • Replace the local cn() definitions in ui/Button.tsx, ui/Card.tsx and ui/EmptyState.tsx with import { cn } from @/app/utils/cn
  • Remove the now-unused clsx/twMerge imports from those files
  • Verify typecheck and that rendered classes are unchanged

Files to touch

  • frontend/src/app/components/ui/Button.tsx
  • frontend/src/app/components/ui/Card.tsx
  • frontend/src/app/components/ui/EmptyState.tsx
  • frontend/src/app/utils/cn.ts

Out of scope

  • Changing the cn implementation itself

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestfrontendIssues related to frontend developmentgood first issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions