Commit 44329d94 authored by Chunchi Che's avatar Chunchi Che

update

parent dd4107f0
Pipeline #21014 passed with stages
in 20 minutes and 49 seconds
import React from "react";
import React, { useRef } from "react";
import { useAppSelector } from "../../hook";
import { store } from "../../store";
import { Modal, Button } from "antd";
import { Button } from "antd";
import { sendSelectEffectYnResponse } from "../../api/ocgcore/ocgHelper";
import {
selectYesNoModalIsOpen,
selectYesNOModalMsg,
} from "../../reducers/duel/modal/mod";
import { setYesNoModalIsOpen } from "../../reducers/duel/mod";
import DragModal from "./dragModal";
const YesNoModal = () => {
const dispatch = store.dispatch;
const isOpen = useAppSelector(selectYesNoModalIsOpen);
const msg = useAppSelector(selectYesNOModalMsg);
// Draggable 相关
const draggleRef = useRef<HTMLDivElement>(null);
return (
<Modal
title={msg}
open={isOpen}
closable={false}
footer={
<DragModal
modalProps={{
title: msg,
open: isOpen,
closable: false,
footer: (
<>
<Button
onClick={() => {
......@@ -38,7 +42,10 @@ const YesNoModal = () => {
No
</Button>
</>
}
),
}}
dragRef={draggleRef}
draggable={true}
/>
);
};
......
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