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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
baichixing
Neos
Commits
2ef8fbcc
Commit
2ef8fbcc
authored
Apr 26, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: some types error
parent
d2b01b1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
src/ui/Duel/PlayMat/FixedSlot.tsx
src/ui/Duel/PlayMat/FixedSlot.tsx
+5
-6
src/ui/Duel/PlayMat/Hands.tsx
src/ui/Duel/PlayMat/Hands.tsx
+13
-13
No files found.
src/ui/Duel/PlayMat/FixedSlot.tsx
View file @
2ef8fbcc
...
...
@@ -6,7 +6,7 @@ import { ygopro } from "@/api";
import
{
sendSelectPlaceResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useClick
}
from
"
@/hook
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
//
import { CardState } from "@/reducers/duel/generic";
import
{
setCardListModalInfo
,
setCardListModalIsOpen
,
...
...
@@ -20,7 +20,7 @@ import { store } from "@/store";
import
{
interactTypeToString
}
from
"
../utils
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
clearAllIdleInteractivities
}
from
"
@/valtioStores
"
;
import
{
clearAllIdleInteractivities
,
type
CardState
}
from
"
@/valtioStores
"
;
const
NeosConfig
=
useConfig
();
...
...
@@ -62,8 +62,8 @@ export const FixedSlot = (props: {
useClick
(
(
_event
)
=>
{
if
(
snapState
.
placeInteractivit
ies
)
{
sendSelectPlaceResponse
(
snapState
.
placeInteractivit
ies
.
response
);
if
(
snapState
.
placeInteractivit
y
)
{
sendSelectPlaceResponse
(
snapState
.
placeInteractivit
y
.
response
);
// dispatch(props.clearPlaceInteractivitiesAction(0));
// dispatch(props.clearPlaceInteractivitiesAction(1));
clearAllIdleInteractivities
(
0
);
...
...
@@ -117,8 +117,7 @@ export const FixedSlot = (props: {
rotation=
{
rotation
}
enableEdgesRendering
edgesWidth=
{
snapState
.
placeInteractivities
||
snapState
.
idleInteractivities
.
length
>
0
snapState
.
placeInteractivity
||
snapState
.
idleInteractivities
.
length
>
0
?
edgesWidth
:
0
}
...
...
src/ui/Duel/PlayMat/Hands.tsx
View file @
2ef8fbcc
...
...
@@ -85,7 +85,7 @@ const CHand = (props: {
const
state
=
props
.
state
;
const
[
hovered
,
setHovered
]
=
useState
(
false
);
const
position
=
props
.
position
;
const
dispatch
=
store
.
dispatch
;
//
const dispatch = store.dispatch;
const
[
spring
,
api
]
=
useSpring
(
()
=>
({
...
...
@@ -120,26 +120,26 @@ const CHand = (props: {
useClick
(
()
=>
{
if
(
state
.
occupant
)
{
dispatch
(
setCardModalMeta
(
state
.
occupant
));
//
dispatch(setCardModalMeta(state.occupant));
messageStore
.
cardModal
.
meta
=
state
.
occupant
;
}
dispatch
(
setCardModalInteractivies
(
state
.
idleInteractivities
.
map
((
interactive
)
=>
{
return
{
desc
:
interactTypeToString
(
interactive
.
interactType
),
response
:
interactive
.
response
,
};
})
)
);
//
dispatch(
//
setCardModalInteractivies(
//
state.idleInteractivities.map((interactive) => {
//
return {
//
desc: interactTypeToString(interactive.interactType),
//
response: interactive.response,
//
};
//
})
//
)
//
);
messageStore
.
cardModal
.
interactivies
=
state
.
idleInteractivities
.
map
(
(
interactive
)
=>
({
desc
:
interactTypeToString
(
interactive
.
interactType
),
response
:
interactive
.
response
,
})
);
dispatch
(
setCardModalIsOpen
(
true
));
//
dispatch(setCardModalIsOpen(true));
messageStore
.
cardModal
.
isOpen
=
true
;
},
planeRef
,
...
...
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