mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice: card import wizard (#4397)
This commit is contained in:
parent
dde0f568d9
commit
36e5a399d5
41 changed files with 1479 additions and 35 deletions
4
webclient/src/components/Card/Card.css
Normal file
4
webclient/src/components/Card/Card.css
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
20
webclient/src/components/Card/Card.tsx
Normal file
20
webclient/src/components/Card/Card.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// eslint-disable-next-line
|
||||
import React, { useMemo, useState } from 'react';
|
||||
|
||||
import { CardDTO } from 'services';
|
||||
|
||||
import './Card.css';
|
||||
|
||||
interface CardProps {
|
||||
card: CardDTO;
|
||||
}
|
||||
|
||||
const Card = ({ card }: CardProps) => {
|
||||
const src = `https://api.scryfall.com/cards/${card?.identifiers?.scryfallId}?format=image`;
|
||||
|
||||
return card && (
|
||||
<img className="card" src={src} alt={card?.name} />
|
||||
);
|
||||
}
|
||||
|
||||
export default Card;
|
||||
Loading…
Add table
Add a link
Reference in a new issue