Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pubsweet
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Tremblay McLellan
pubsweet
Commits
4536b574
Commit
4536b574
authored
6 years ago
by
Alexandros Georgantas
Browse files
Options
Downloads
Patches
Plain Diff
refactor(teams reducer): revert logic of delete
parent
db27c386
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/client/src/reducers/teams.js
+2
-6
2 additions, 6 deletions
packages/client/src/reducers/teams.js
with
2 additions
and
6 deletions
packages/client/src/reducers/teams.js
+
2
−
6
View file @
4536b574
...
...
@@ -2,7 +2,7 @@ import clone from 'lodash/clone'
import
findIndex
from
'
lodash/findIndex
'
import
find
from
'
lodash/find
'
import
unionBy
from
'
lodash/unionBy
'
import
without
from
'
lodash/
without
'
import
differenceBy
from
'
lodash/
differenceBy
'
import
{
GET_TEAMS_SUCCESS
,
...
...
@@ -35,11 +35,7 @@ export default function(state = [], action) {
teams
[
index
]
=
{
...
teams
[
index
],
...
action
.
update
}
return
teams
}
function
deleteTeam
()
{
const
team
=
getTeam
()
return
without
(
teams
,
team
)
}
switch
(
action
.
type
)
{
case
CREATE_TEAM_SUCCESS
:
return
addTeam
()
...
...
@@ -48,7 +44,7 @@ export default function(state = [], action) {
case
GET_TEAMS_SUCCESS
:
return
clone
(
action
.
teams
)
case
DELETE_TEAM_SUCCESS
:
return
d
eleteTeam
(
)
return
d
ifferenceBy
(
state
,
[
action
.
team
],
'
id
'
)
case
LOGOUT_SUCCESS
:
return
[]
case
GET_COLLECTION_TEAMS_SUCCESS
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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