Commit e5361269 authored by Chunchi Che's avatar Chunchi Che

handle YgoCard

parent 45ab0482
Pipeline #27317 passed with stages
in 6 minutes and 44 seconds
...@@ -50,6 +50,7 @@ const helper = async ( ...@@ -50,6 +50,7 @@ const helper = async (
level2, level2,
effectDesc, effectDesc,
response, response,
targeted: target?.targeted,
}; };
if (selected) { if (selected) {
......
...@@ -56,6 +56,7 @@ export const CardListModal = () => { ...@@ -56,6 +56,7 @@ export const CardListModal = () => {
<YgoCard <YgoCard
code={card.code} code={card.code}
key={card.uuid} key={card.uuid}
targeted={card.targeted}
width={CARD_WIDTH} width={CARD_WIDTH}
onClick={() => showCardModal(card)} onClick={() => showCardModal(card)}
/> />
......
...@@ -180,6 +180,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({ ...@@ -180,6 +180,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
cover={ cover={
<YgoCard <YgoCard
code={card.meta.id} code={card.meta.id}
targeted={card.targeted}
className={styles.card} className={styles.card}
/> />
} }
...@@ -217,7 +218,11 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({ ...@@ -217,7 +218,11 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
<div> <div>
<Card <Card
cover={ cover={
<YgoCard code={card.meta.id} className={styles.card} /> <YgoCard
code={card.meta.id}
targeted={card.targeted}
className={styles.card}
/>
} }
className={styles["check-card"]} className={styles["check-card"]}
onClick={() => { onClick={() => {
...@@ -264,6 +269,9 @@ export interface Option { ...@@ -264,6 +269,9 @@ export interface Option {
level1?: number; level1?: number;
level2?: number; level2?: number;
response?: number; response?: number;
targeted?: boolean;
// 便于直接返回这个信息 // 便于直接返回这个信息
//
// 尽量不要用这个字段
card?: CardType; card?: CardType;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment