Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ecolyo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
Ecolyo
Commits
f603b430
Commit
f603b430
authored
4 years ago
by
Yoan VALLET
Browse files
Options
Downloads
Patches
Plain Diff
feat: add notification for season
parent
92037416
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!148
Features/us283 boss notification
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Splash/SplashRoot.tsx
+4
-15
4 additions, 15 deletions
src/components/Splash/SplashRoot.tsx
with
4 additions
and
15 deletions
src/components/Splash/SplashRoot.tsx
+
4
−
15
View file @
f603b430
...
@@ -4,20 +4,18 @@ import classNames from 'classnames'
...
@@ -4,20 +4,18 @@ import classNames from 'classnames'
import
{
useDispatch
}
from
'
react-redux
'
import
{
useDispatch
}
from
'
react-redux
'
import
{
import
{
toogleReportNotification
,
toogleReportNotification
,
toogleSeasonNotification
,
setFluidStatus
,
setFluidStatus
,
}
from
'
store/global/global.actions
'
}
from
'
store/global/global.actions
'
import
{
updateProfile
}
from
'
store/profile/profile.actions
'
import
{
updateProfile
}
from
'
store/profile/profile.actions
'
import
{
import
{
setUserSeasonList
,
setUserSeasonList
,
setSeasonConsumption
,
setSeasonConsumption
,
updateUserSeasonList
,
unlockNextUserSeason
,
}
from
'
store/season/season.actions
'
}
from
'
store/season/season.actions
'
import
InitializationService
from
'
services/initialization.service
'
import
InitializationService
from
'
services/initialization.service
'
import
{
UserSeasonState
}
from
'
enum/userSeason.enum
'
import
{
UserSeasonState
}
from
'
enum/userSeason.enum
'
import
{
UserBossState
}
from
'
enum/userBoss.enum
'
import
{
UserBossState
}
from
'
enum/userBoss.enum
'
import
SeasonService
from
'
services/season.service
'
import
SeasonService
from
'
services/season.service
'
import
{
UpdateUserSeason
}
from
'
enum/updateUserSeason.enum
'
interface
SplashRootProps
{
interface
SplashRootProps
{
fadeTimer
?:
number
fadeTimer
?:
number
...
@@ -120,22 +118,13 @@ const SplashRoot = ({
...
@@ -120,22 +118,13 @@ const SplashRoot = ({
filteredCurrentBossSeason
[
0
]
filteredCurrentBossSeason
[
0
]
)
)
dispatch
(
setSeasonConsumption
(
updatedUserSeason
,
dataloads
))
dispatch
(
setSeasonConsumption
(
updatedUserSeason
,
dataloads
))
// Check is boss is done
// Check is boss is done
and siplay notification
const
seasonService
=
new
SeasonService
(
client
)
const
seasonService
=
new
SeasonService
(
client
)
const
{
isDone
,
isWin
}
=
await
seasonService
.
isSeasonDone
(
const
{
isDone
}
=
await
seasonService
.
isSeasonDone
(
updatedUserSeason
,
updatedUserSeason
,
dataloads
dataloads
)
)
if
(
isDone
===
true
)
{
dispatch
(
toogleSeasonNotification
(
isDone
))
const
doneUserSeason
=
await
seasonService
.
updateUserSeason
(
updatedUserSeason
,
isWin
===
true
?
UpdateUserSeason
.
BOSS_WIN
:
UpdateUserSeason
.
BOSS_LOSS
)
dispatch
(
updateUserSeasonList
(
doneUserSeason
))
dispatch
(
unlockNextUserSeason
(
doneUserSeason
))
}
}
}
}
}
// Update state
// Update state
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment