feat(wallet): enhance wallet UI and transaction item display fix(profile): update profile detail card to handle loading and error states style: improve UI consistency across profile and wallet components
38 lines
No EOL
862 B
TypeScript
38 lines
No EOL
862 B
TypeScript
'use client';
|
|
|
|
import Link from 'next/link';
|
|
import { ChevronLeft, User } from 'lucide-react';
|
|
|
|
interface ProfileMenuItemInterface {
|
|
href: string;
|
|
text: string;
|
|
icon?: React.ReactNode;
|
|
isLast?: boolean;
|
|
}
|
|
|
|
const ProfileMenuItem = ({
|
|
href,
|
|
text,
|
|
icon,
|
|
isLast = false,
|
|
}: ProfileMenuItemInterface) => {
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className={`
|
|
flex items-center justify-between w-full py-3
|
|
${!isLast ? 'border-b border-border' : ''}
|
|
`}
|
|
>
|
|
<div className="flex items-center gap-3">
|
|
<div className="bg-gray-50 p-2 rounded-lg">
|
|
{icon || <User className="w-4 h-4 text-primary-action" />}
|
|
</div>
|
|
<span className="text-sm text-gray-700">{text}</span>
|
|
</div>
|
|
<ChevronLeft className="w-5 h-5 text-gray-500" />
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default ProfileMenuItem; |