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