Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
44329d94
Commit
44329d94
authored
Mar 30, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
dd4107f0
Pipeline
#21014
passed with stages
in 20 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
26 deletions
+33
-26
src/ui/Duel/yesNoModal.tsx
src/ui/Duel/yesNoModal.tsx
+33
-26
No files found.
src/ui/Duel/yesNoModal.tsx
View file @
44329d94
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=
{
<>
<
Button
onClick=
{
()
=>
{
sendSelectEffectYnResponse
(
true
);
dispatch
(
setYesNoModalIsOpen
(
false
));
}
}
>
Yes
</
Button
>
<
Button
onClick=
{
()
=>
{
sendSelectEffectYnResponse
(
false
);
dispatch
(
setYesNoModalIsOpen
(
false
));
}
}
>
No
</
Button
>
</>
}
<
DragModal
modalProps=
{
{
title
:
msg
,
open
:
isOpen
,
closable
:
false
,
footer
:
(
<>
<
Button
onClick=
{
()
=>
{
sendSelectEffectYnResponse
(
true
);
dispatch
(
setYesNoModalIsOpen
(
false
));
}
}
>
Yes
</
Button
>
<
Button
onClick=
{
()
=>
{
sendSelectEffectYnResponse
(
false
);
dispatch
(
setYesNoModalIsOpen
(
false
));
}
}
>
No
</
Button
>
</>
),
}
}
dragRef=
{
draggleRef
}
draggable=
{
true
}
/>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment