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
6cb57575
Commit
6cb57575
authored
Dec 24, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/ui/chat' into 'main'
add chat ui See merge request
mycard/Neos!46
parents
68c94d96
b1f7376c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/ui/Duel/simpleDuel/hintNotification.tsx
src/ui/Duel/simpleDuel/hintNotification.tsx
+13
-0
No files found.
src/ui/Duel/simpleDuel/hintNotification.tsx
View file @
6cb57575
...
@@ -2,12 +2,14 @@ import React, { useEffect } from "react";
...
@@ -2,12 +2,14 @@ import React, { useEffect } from "react";
import
{
useAppSelector
}
from
"
../../../hook
"
;
import
{
useAppSelector
}
from
"
../../../hook
"
;
import
{
selectMeHint
,
selectOpHint
}
from
"
../../../reducers/duel/hintSlice
"
;
import
{
selectMeHint
,
selectOpHint
}
from
"
../../../reducers/duel/hintSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../../reducers/duel/phaseSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../../reducers/duel/phaseSlice
"
;
import
{
selectChat
}
from
"
../../../reducers/chatSlice
"
;
import
{
notification
}
from
"
antd
"
;
import
{
notification
}
from
"
antd
"
;
const
HintNotification
=
()
=>
{
const
HintNotification
=
()
=>
{
const
meHint
=
useAppSelector
(
selectMeHint
);
const
meHint
=
useAppSelector
(
selectMeHint
);
const
opHint
=
useAppSelector
(
selectOpHint
);
const
opHint
=
useAppSelector
(
selectOpHint
);
const
currentPhase
=
useAppSelector
(
selectCurrentPhase
);
const
currentPhase
=
useAppSelector
(
selectCurrentPhase
);
const
chat
=
useAppSelector
(
selectChat
);
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
const
[
api
,
contextHolder
]
=
notification
.
useNotification
();
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -32,10 +34,21 @@ const HintNotification = () => {
...
@@ -32,10 +34,21 @@ const HintNotification = () => {
if
(
currentPhase
)
{
if
(
currentPhase
)
{
api
.
info
({
api
.
info
({
message
:
`<当前阶段>
${
currentPhase
}
`
,
message
:
`<当前阶段>
${
currentPhase
}
`
,
placement
:
"
topRight
"
,
});
});
}
}
},
[
currentPhase
]);
},
[
currentPhase
]);
useEffect
(()
=>
{
if
(
chat
!==
""
)
{
api
.
info
({
message
:
"
Chat
"
,
description
:
chat
,
placement
:
"
topLeft
"
,
});
}
},
[
chat
]);
return
<>
{
contextHolder
}
</>;
return
<>
{
contextHolder
}
</>;
};
};
...
...
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