Commit ac5439ab authored by Chunchi Che's avatar Chunchi Che

optimize hint

parent 9f376563
Pipeline #21071 failed with stages
in 88 minutes and 8 seconds
......@@ -22,6 +22,7 @@ import {
import { ThunderboltOutlined } from "@ant-design/icons";
import NeosConfig from "../../../neos.config.json";
import DragModal from "./dragModal";
import { selectMeHint } from "../../reducers/duel/hintSlice";
const CheckCardModal = () => {
const dispatch = store.dispatch;
......@@ -33,6 +34,7 @@ const CheckCardModal = () => {
const cancelResponse = useAppSelector(selectCheckCardModalCacnelResponse);
const [response, setResponse] = useState<number[]>([]);
const defaultValue: number[] = [];
const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片";
// TODO: 这里可以考虑更好地封装
const sendResponseHandler = (
......@@ -55,7 +57,7 @@ const CheckCardModal = () => {
return (
<DragModal
title={`请选择${min}到${max}张卡片`}
title={`${selectHint} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
......@@ -20,6 +20,7 @@ import {
} from "../../reducers/duel/mod";
import NeosConfig from "../../../neos.config.json";
import DragModal from "./dragModal";
import { selectMeHint } from "../../reducers/duel/hintSlice";
const CheckCardModalV2 = () => {
const dispatch = store.dispatch;
......@@ -32,6 +33,7 @@ const CheckCardModalV2 = () => {
);
const selectedOptions = useAppSelector(selectCheckCardModalV2SelectedOptions);
const responseable = useAppSelector(selectCheckCardModalV2ResponseAble);
const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片";
const onFinish = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true });
......@@ -46,7 +48,7 @@ const CheckCardModalV2 = () => {
return (
<DragModal
title={`请选择未选择的卡片,最少${min}张,最多${max}张`}
title={`${selectHint} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
......@@ -12,6 +12,7 @@ import {
import NeosConfig from "../../../neos.config.json";
import { selectCheckCardModalV3 } from "../../reducers/duel/modal/checkCardModalV3Slice";
import DragModal from "./dragModal";
import { selectMeHint } from "../../reducers/duel/hintSlice";
const CheckCardModalV3 = () => {
const dispatch = store.dispatch;
......@@ -32,6 +33,7 @@ const CheckCardModalV3 = () => {
.concat(selectedOptions)
.map((option) => option.level2)
.reduce((sum, current) => sum + current, 0);
const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片";
const responseable =
(overflow
......@@ -50,7 +52,7 @@ const CheckCardModalV3 = () => {
return (
<DragModal
title={`请选择卡片,最少${min}张,最多${max}张`}
title={`${selectHint} ${min}-${max}`}
open={isOpen}
closable={false}
footer={
......
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