Commit 84b388d9 authored by Chunchi Che's avatar Chunchi Che

display disabled for select modal

parent 7b939eba
Pipeline #28745 passed with stages
in 14 minutes and 31 seconds
import type { ygopro } from "@/api";
import { fetchCard, getCardStr } from "@/api/cards";
import { Context } from "@/container";
import { isCardDisabled } from "@/stores";
import type { Option } from "@/ui/Duel/Message";
const helper = async (
......@@ -52,6 +53,7 @@ const helper = async (
effectDesc,
response,
targeted: target?.targeted,
disabled: target ? isCardDisabled(target) : false,
};
if (selected) {
......
......@@ -197,6 +197,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
<YgoCard
code={card.meta.id}
targeted={card.targeted}
disabled={card.disabled}
className={styles.card}
/>
}
......@@ -286,6 +287,7 @@ export interface Option {
level2?: number;
response?: number;
targeted?: boolean;
disabled?: boolean;
// 便于直接返回这个信息
//
// 尽量不要用这个字段
......
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