Commit d1060dbd authored by chechunchi's avatar chechunchi

add Popover in CheckCardModal

parent 829c5bc4
...@@ -135,7 +135,7 @@ export const fetchCheckCardMeta = createAsyncThunk( ...@@ -135,7 +135,7 @@ export const fetchCheckCardMeta = createAsyncThunk(
code: meta.id, code: meta.id,
name: meta.text.name, name: meta.text.name,
desc: meta.text.desc, desc: meta.text.desc,
effectDesc effectDesc,
}, },
}; };
......
...@@ -2,4 +2,11 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore"; ...@@ -2,4 +2,11 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import { AppDispatch } from "../../store"; import { AppDispatch } from "../../store";
import MsgSelectChain = ygopro.StocGameMessage.MsgSelectChain; import MsgSelectChain = ygopro.StocGameMessage.MsgSelectChain;
export default (selectChain: MsgSelectChain, dispatch: AppDispatch) => {}; export default (selectChain: MsgSelectChain, dispatch: AppDispatch) => {
const player = selectChain.player;
const spCount = selectChain.special_count;
const forced = selectChain.forced;
const hint0 = selectChain.hint0;
const hint1 = selectChain.hint1;
const chains = selectChain.chains;
};
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
resetCheckCardModal, resetCheckCardModal,
setCheckCardModalIsOpen, setCheckCardModalIsOpen,
} from "../../reducers/duel/mod"; } from "../../reducers/duel/mod";
import { Modal, Button, Row, Col } from "antd"; import { Modal, Button, Row, Col, Popover } from "antd";
import { CheckCard } from "@ant-design/pro-components"; import { CheckCard } from "@ant-design/pro-components";
import { sendSelectCardResponse } from "../../api/ocgcore/ocgHelper"; import { sendSelectCardResponse } from "../../api/ocgcore/ocgHelper";
...@@ -57,6 +57,14 @@ const CheckCardModal = () => { ...@@ -57,6 +57,14 @@ const CheckCardModal = () => {
{tab.options.map((option, idx) => { {tab.options.map((option, idx) => {
return ( return (
<Col span={4} key={idx}> <Col span={4} key={idx}>
<Popover
content={
<div>
<p>{option.name}</p>
<p>{option.effectDesc}</p>
</div>
}
>
<CheckCard <CheckCard
title={option.name} title={option.name}
description={option.desc} description={option.desc}
...@@ -70,6 +78,7 @@ const CheckCardModal = () => { ...@@ -70,6 +78,7 @@ const CheckCardModal = () => {
} }
value={option.response} value={option.response}
/> />
</Popover>
</Col> </Col>
); );
})} })}
......
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