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
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
Show 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";
...
@@ -6,7 +6,7 @@ import { ygopro } from "@/api";
import
{
sendSelectPlaceResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
sendSelectPlaceResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useClick
}
from
"
@/hook
"
;
import
{
useClick
}
from
"
@/hook
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
//
import { CardState } from "@/reducers/duel/generic";
import
{
import
{
setCardListModalInfo
,
setCardListModalInfo
,
setCardListModalIsOpen
,
setCardListModalIsOpen
,
...
@@ -20,7 +20,7 @@ import { store } from "@/store";
...
@@ -20,7 +20,7 @@ import { store } from "@/store";
import
{
interactTypeToString
}
from
"
../utils
"
;
import
{
interactTypeToString
}
from
"
../utils
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
clearAllIdleInteractivities
}
from
"
@/valtioStores
"
;
import
{
clearAllIdleInteractivities
,
type
CardState
}
from
"
@/valtioStores
"
;
const
NeosConfig
=
useConfig
();
const
NeosConfig
=
useConfig
();
...
@@ -62,8 +62,8 @@ export const FixedSlot = (props: {
...
@@ -62,8 +62,8 @@ export const FixedSlot = (props: {
useClick
(
useClick
(
(
_event
)
=>
{
(
_event
)
=>
{
if
(
snapState
.
placeInteractivit
ies
)
{
if
(
snapState
.
placeInteractivit
y
)
{
sendSelectPlaceResponse
(
snapState
.
placeInteractivit
ies
.
response
);
sendSelectPlaceResponse
(
snapState
.
placeInteractivit
y
.
response
);
// dispatch(props.clearPlaceInteractivitiesAction(0));
// dispatch(props.clearPlaceInteractivitiesAction(0));
// dispatch(props.clearPlaceInteractivitiesAction(1));
// dispatch(props.clearPlaceInteractivitiesAction(1));
clearAllIdleInteractivities
(
0
);
clearAllIdleInteractivities
(
0
);
...
@@ -117,8 +117,7 @@ export const FixedSlot = (props: {
...
@@ -117,8 +117,7 @@ export const FixedSlot = (props: {
rotation=
{
rotation
}
rotation=
{
rotation
}
enableEdgesRendering
enableEdgesRendering
edgesWidth=
{
edgesWidth=
{
snapState
.
placeInteractivities
||
snapState
.
placeInteractivity
||
snapState
.
idleInteractivities
.
length
>
0
snapState
.
idleInteractivities
.
length
>
0
?
edgesWidth
?
edgesWidth
:
0
:
0
}
}
...
...
src/ui/Duel/PlayMat/Hands.tsx
View file @
2ef8fbcc
...
@@ -85,7 +85,7 @@ const CHand = (props: {
...
@@ -85,7 +85,7 @@ const CHand = (props: {
const
state
=
props
.
state
;
const
state
=
props
.
state
;
const
[
hovered
,
setHovered
]
=
useState
(
false
);
const
[
hovered
,
setHovered
]
=
useState
(
false
);
const
position
=
props
.
position
;
const
position
=
props
.
position
;
const
dispatch
=
store
.
dispatch
;
//
const dispatch = store.dispatch;
const
[
spring
,
api
]
=
useSpring
(
const
[
spring
,
api
]
=
useSpring
(
()
=>
({
()
=>
({
...
@@ -120,26 +120,26 @@ const CHand = (props: {
...
@@ -120,26 +120,26 @@ const CHand = (props: {
useClick
(
useClick
(
()
=>
{
()
=>
{
if
(
state
.
occupant
)
{
if
(
state
.
occupant
)
{
dispatch
(
setCardModalMeta
(
state
.
occupant
));
//
dispatch(setCardModalMeta(state.occupant));
messageStore
.
cardModal
.
meta
=
state
.
occupant
;
messageStore
.
cardModal
.
meta
=
state
.
occupant
;
}
}
dispatch
(
//
dispatch(
setCardModalInteractivies
(
//
setCardModalInteractivies(
state
.
idleInteractivities
.
map
((
interactive
)
=>
{
//
state.idleInteractivities.map((interactive) => {
return
{
//
return {
desc
:
interactTypeToString
(
interactive
.
interactType
),
//
desc: interactTypeToString(interactive.interactType),
response
:
interactive
.
response
,
//
response: interactive.response,
};
//
};
})
//
})
)
//
)
);
//
);
messageStore
.
cardModal
.
interactivies
=
state
.
idleInteractivities
.
map
(
messageStore
.
cardModal
.
interactivies
=
state
.
idleInteractivities
.
map
(
(
interactive
)
=>
({
(
interactive
)
=>
({
desc
:
interactTypeToString
(
interactive
.
interactType
),
desc
:
interactTypeToString
(
interactive
.
interactType
),
response
:
interactive
.
response
,
response
:
interactive
.
response
,
})
})
);
);
dispatch
(
setCardModalIsOpen
(
true
));
//
dispatch(setCardModalIsOpen(true));
messageStore
.
cardModal
.
isOpen
=
true
;
messageStore
.
cardModal
.
isOpen
=
true
;
},
},
planeRef
,
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