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
e8dcd004
Commit
e8dcd004
authored
Mar 30, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e62cf7c5
Pipeline
#21025
passed with stages
in 18 minutes and 6 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
src/reducers/duel/modal/checkCounterModalSlice.ts
src/reducers/duel/modal/checkCounterModalSlice.ts
+0
-0
src/ui/Duel/checkCounterModal.tsx
src/ui/Duel/checkCounterModal.tsx
+8
-7
No files found.
src/reducers/duel/modal/checkCounterModalSlice.ts
x
→
src/reducers/duel/modal/checkCounterModalSlice.ts
View file @
e8dcd004
File moved
src/ui/Duel/checkCounterModal.tsx
View file @
e8dcd004
...
...
@@ -16,13 +16,14 @@ const CheckCounterModal = () => {
const
counterName
=
fetchStrings
(
"
!counter
"
,
`0x
${
state
.
counterType
!
}
`
);
const
min
=
state
.
min
||
0
;
const
options
=
state
.
options
;
const
[
selected
,
setSelected
]
=
useState
(
options
.
map
((
_
)
=>
0
));
const
finishable
=
selected
.
reduce
((
sum
,
current
)
=>
sum
+
current
,
0
)
==
min
;
const
[
selected
,
setSelected
]
=
useState
(
new
Array
(
options
.
length
));
const
sum
=
selected
.
reduce
((
sum
,
current
)
=>
sum
+
current
,
0
);
const
finishable
=
sum
==
min
;
const
draggleRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
onFinish
=
()
=>
{
sendSelectCounterResponse
(
selected
);
dispatch
(
clearCheckCounter
);
dispatch
(
clearCheckCounter
()
);
};
return
(
...
...
@@ -59,10 +60,10 @@ const CheckCounterModal = () => {
max=
{
option
.
max
}
defaultValue=
{
0
}
onChange=
{
(
value
)
=>
{
setSelected
((
prev
)
=>
({
...
prev
,
[
idx
]:
value
||
0
,
})
);
let
newSelected
=
[...
selected
];
newSelected
[
idx
]
=
value
||
0
;
setSelected
(
newSelected
);
}
}
/>
</
Card
>
...
...
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