Commit 188439f5 authored by chechunchi's avatar chechunchi

fix lint

parent 44d9aa52
...@@ -3,14 +3,11 @@ import React from "react"; ...@@ -3,14 +3,11 @@ import React from "react";
import { proxy, useSnapshot } from "valtio"; import { proxy, useSnapshot } from "valtio";
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { useConfig } from "@/config";
import { cardStore, CardType } from "@/stores"; import { cardStore, CardType } from "@/stores";
import { YgoCard } from "@/ui/Shared"; import { YgoCard } from "@/ui/Shared";
import { showCardModal } from "./CardModal"; import { showCardModal } from "./CardModal";
const NeosConfig = useConfig();
const CARD_WIDTH = 100; const CARD_WIDTH = 100;
// TODO: 显示的位置还需要细细斟酌 // TODO: 显示的位置还需要细细斟酌
......
...@@ -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 } = snap;
const name = meta?.text.name; const name = meta?.text.name;
const types = meta?.data.type; const types = meta?.data.type;
...@@ -152,7 +152,7 @@ const AtkLine = (props: { atk?: number; def?: number }) => ( ...@@ -152,7 +152,7 @@ const AtkLine = (props: { atk?: number; def?: number }) => (
); );
// TODO: 未完成,研究一下怎么展示这个信息 // TODO: 未完成,研究一下怎么展示这个信息
const CounterLine = (props: { counters: { [type: number]: number } }) => { const _CounterLine = (props: { counters: { [type: number]: number } }) => {
const counters = []; const counters = [];
for (const counterType in props.counters) { for (const counterType in props.counters) {
const count = props.counters[counterType]; const count = props.counters[counterType];
......
...@@ -8,7 +8,6 @@ import { ...@@ -8,7 +8,6 @@ import {
getCardStr, getCardStr,
sendSelectIdleCmdResponse, sendSelectIdleCmdResponse,
sendSelectOptionResponse, sendSelectOptionResponse,
ygopro,
} from "@/api"; } from "@/api";
import { NeosModal } from "./NeosModal"; import { NeosModal } from "./NeosModal";
......
...@@ -33,10 +33,10 @@ export interface SelectCardsModalProps { ...@@ -33,10 +33,10 @@ export interface SelectCardsModalProps {
export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
isOpen, isOpen,
isChain, isChain: _isChain,
min, min,
max, max,
selecteds, selecteds: _selecteds,
selectables, selectables,
mustSelects, mustSelects,
cancelable, cancelable,
...@@ -47,6 +47,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({ ...@@ -47,6 +47,7 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
onCancel, onCancel,
onFinish, onFinish,
}) => { }) => {
// FIXME: handle `isChain` and `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; // 是否是单选
......
...@@ -7,7 +7,6 @@ import React, { type CSSProperties, useEffect, useState } from "react"; ...@@ -7,7 +7,6 @@ import React, { type CSSProperties, useEffect, useState } from "react";
import { proxy, useSnapshot } from "valtio"; import { proxy, useSnapshot } from "valtio";
import { getCardStr, sendSelectIdleCmdResponse, ygopro } from "@/api"; import { getCardStr, sendSelectIdleCmdResponse, ygopro } from "@/api";
import { useConfig } from "@/config";
import { eventbus, Task } from "@/infra"; import { eventbus, Task } from "@/infra";
import { cardStore, CardType, Interactivity, InteractType } from "@/stores"; import { cardStore, CardType, Interactivity, InteractType } from "@/stores";
import { showCardModal as displayCardModal } from "@/ui/Duel/Message/CardModal"; import { showCardModal as displayCardModal } from "@/ui/Duel/Message/CardModal";
...@@ -28,7 +27,6 @@ import { ...@@ -28,7 +27,6 @@ import {
moveToOutside, moveToOutside,
} from "./springs"; } from "./springs";
import type { SpringApiProps } from "./springs/types"; import type { SpringApiProps } from "./springs/types";
const NeosConfig = useConfig();
const { HAND, GRAVE, REMOVED, DECK, EXTRA, MZONE, SZONE, TZONE } = const { HAND, GRAVE, REMOVED, DECK, EXTRA, MZONE, SZONE, TZONE } =
ygopro.CardZone; ygopro.CardZone;
......
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