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
3b0de3ec
Commit
3b0de3ec
authored
Mar 16, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix strings
parent
06cbef40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+0
-16
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+5
-2
No files found.
src/ui/Duel/main.tsx
View file @
3b0de3ec
...
...
@@ -20,7 +20,6 @@ import Phase from "./phase";
import
CheckCardModalV2
from
"
./checkCardModalV2
"
;
import
ExtraDeck
from
"
./extraDeck
"
;
import
NeosLayout
from
"
./layout
"
;
import
{
initStrings
}
from
"
../../api/strings
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DuelTimeLine
from
"
./timeLine
"
;
import
{
Row
}
from
"
antd
"
;
...
...
@@ -34,21 +33,6 @@ import {
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
// 应该用更优雅的方式处理`useEffect`执行两次的问题
const
initialRender
=
useRef
(
true
);
useEffect
(()
=>
{
const
init
=
async
()
=>
{
await
initStrings
();
};
if
(
initialRender
.
current
)
{
initialRender
.
current
=
false
;
return
;
}
init
();
},
[]);
const
meInfo
=
useAppSelector
(
selectMeInitInfo
);
const
opInfo
=
useAppSelector
(
selectOpInitInfo
);
...
...
src/ui/WaitRoom.tsx
View file @
3b0de3ec
...
...
@@ -46,6 +46,7 @@ import NeosConfig from "../../neos.config.json";
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
//@ts-ignore
import
rustInit
from
"
rust-src
"
;
import
{
initStrings
}
from
"
../api/strings
"
;
const
READY_STATE
=
"
ready
"
;
...
...
@@ -78,9 +79,11 @@ const WaitRoom = () => {
initInfo
:
{
dbUrl
:
NeosConfig
.
cardsDbUrl
},
});
// 初始化文案
await
initStrings
();
// 初始化wasm
const
wasm
=
await
rustInit
();
console
.
log
(
wasm
);
await
rustInit
();
};
init
();
...
...
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