diff --git a/app/components/assets/list/asset-card.tsx b/app/components/assets/list/asset-card.tsx new file mode 100644 index 0000000..995cd54 --- /dev/null +++ b/app/components/assets/list/asset-card.tsx @@ -0,0 +1,41 @@ +import { memo } from 'react'; +import { Link } from 'react-router'; +import { Pencil, Trash2 } from 'lucide-react'; +import { Button } from '~/components/ui/button'; +import { Card } from '~/components/ui/card'; +import { TextPair } from '~/components/ui/text-pair'; +import { AssetQr } from '~/components/assets/asset-qr'; +import { AssetProjectChip } from '~/components/assets/list/asset-project-chip'; +import { ROUTES } from '~/data/routes'; +import { formatDate } from '~/lib/format'; +import type { ArAsset } from '~/types/asset'; + +interface AssetCardProps { + asset: ArAsset; + showProject: boolean; + onEdit: (asset: ArAsset) => void; + onDelete: (asset: ArAsset) => void; +} + +export const AssetCard = memo(function AssetCard({ asset, showProject, onEdit, onDelete }: AssetCardProps) { + const name = asset.name || 'Untitled'; + return ( + + +
+ + + +
+ + +
+
+ {showProject && } +
+ ); +});