Commit 582c0349 authored by chechunchi's avatar chechunchi

remove isChain from SelectCardsModalProps

parent 188439f5
Pipeline #22456 passed with stages
in 14 minutes and 26 seconds
......@@ -42,7 +42,7 @@ const store = proxy(defaultStore);
export const CardModal = () => {
const snap = useSnapshot(store);
const { isOpen, meta, _counters } = snap;
const { isOpen, meta, counters: _counters } = snap;
const name = meta?.text.name;
const types = meta?.data.type;
......
......@@ -16,7 +16,7 @@ const FINISH_RESPONSE = -1;
const defaultProps: Omit<
SelectCardsModalProps,
"onSubmit" | "onCancel" | "onFinish"
> = {
> & { isChain: boolean } = {
isOpen: false,
isChain: false,
min: 0,
......@@ -72,7 +72,6 @@ export const SelectActionsModal: React.FC = () => {
<SelectCardsModal
{...{
isOpen,
isChain,
min,
max,
selecteds,
......
......@@ -16,7 +16,6 @@ import { NeosModal } from "../NeosModal";
export interface SelectCardsModalProps {
isOpen: boolean;
isChain: boolean;
min: number;
max: number;
selecteds: Snapshot<Option[]>; // 已经选择了的卡
......@@ -33,7 +32,6 @@ export interface SelectCardsModalProps {
export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
isOpen,
isChain: _isChain,
min,
max,
selecteds: _selecteds,
......@@ -47,7 +45,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
onCancel,
onFinish,
}) => {
// FIXME: handle `isChain` and `selecteds`
// FIXME: handle `selecteds`
const [result, setResult] = useState<Option[]>([]);
const [submitable, setSubmitable] = useState(false);
const single = min === 1 && max === 1; // 是否是单选
......
......@@ -15,7 +15,6 @@ export const SimpleSelectCardsModal: React.FC = () => {
return (
<SelectCardsModal
isOpen={isOpen}
isChain={false}
min={1}
max={1}
selecteds={[]}
......
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