Initial commit from your app

This commit is contained in:
Reynier Matthieu
2025-02-27 16:56:23 +01:00
parent f5e02f6b78
commit 3933415b2d
5 changed files with 1220 additions and 1051 deletions

View File

@@ -0,0 +1,31 @@
import React from 'react';
import { Card } from '../types';
interface MagicCardProps {
card: Card;
}
const MagicCard = ({ card }: MagicCardProps) => {
return (
<div className="relative">
{card.image_uris?.normal ? (
<img
src={card.image_uris.normal}
alt={card.name}
className="w-full h-auto rounded-lg"
/>
) : (
<div className="w-full h-64 bg-gray-700 rounded-lg flex items-center justify-center text-gray-400">
No Image Available
</div>
)}
{card.prices?.usd && (
<div className="absolute bottom-0 left-0 p-2 bg-gray-900 bg-opacity-50 text-white rounded-bl-lg rounded-tr-lg">
${card.prices.usd}
</div>
)}
</div>
);
};
export default MagicCard;