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
love_飞影
Neos
Commits
99eae70d
Commit
99eae70d
authored
Apr 26, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: jump mora cause duel never starting
parent
26cf22d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/ui/Mora.tsx
src/ui/Mora.tsx
+4
-4
src/valtioStores/moraStore.ts
src/valtioStores/moraStore.ts
+2
-2
No files found.
src/ui/Mora.tsx
View file @
99eae70d
...
@@ -19,7 +19,7 @@ import {
...
@@ -19,7 +19,7 @@ import {
unSelectTpAble
,
unSelectTpAble
,
}
from
"
@/reducers/moraSlice
"
;
}
from
"
@/reducers/moraSlice
"
;
import
{
store
}
from
"
@/store
"
;
import
{
store
}
from
"
@/store
"
;
import
{
moraStore
}
from
"
@/valtioStores
"
;
import
{
moraStore
,
matStore
}
from
"
@/valtioStores
"
;
const
{
const
{
automation
:
{
isAiMode
,
isAiFirst
},
automation
:
{
isAiMode
,
isAiFirst
},
...
@@ -36,7 +36,7 @@ const Mora = () => {
...
@@ -36,7 +36,7 @@ const Mora = () => {
const
selectHandAble
=
snapMora
.
selectHandAble
;
const
selectHandAble
=
snapMora
.
selectHandAble
;
const
selectTpAble
=
snapMora
.
selectTpAble
;
const
selectTpAble
=
snapMora
.
selectTpAble
;
const
duelHsStart
=
snapMora
.
duelStart
;
//
const duelHsStart = snapMora.duelStart;
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
const
{
player
,
passWd
,
ip
}
=
useParams
<
{
const
{
player
,
passWd
,
ip
}
=
useParams
<
{
...
@@ -58,10 +58,10 @@ const Mora = () => {
...
@@ -58,10 +58,10 @@ const Mora = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
// 若对局已经开始,自动跳转
// 若对局已经开始,自动跳转
if
(
duelHsStart
)
{
if
(
!
selectHandAble
)
{
navigate
(
`/duel/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
navigate
(
`/duel/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
}
}
},
[
duelHsStart
]);
},
[
selectHandAble
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
isAiMode
)
{
if
(
isAiMode
)
{
...
...
src/valtioStores/moraStore.ts
View file @
99eae70d
...
@@ -8,6 +8,6 @@ export interface MoraState {
...
@@ -8,6 +8,6 @@ export interface MoraState {
export
const
moraStore
=
proxy
<
MoraState
>
({
export
const
moraStore
=
proxy
<
MoraState
>
({
duelStart
:
false
,
duelStart
:
false
,
selectHandAble
:
fals
e
,
selectHandAble
:
tru
e
,
selectTpAble
:
fals
e
,
selectTpAble
:
tru
e
,
});
});
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