Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
C
cms
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pedro-dev_2
cms
Commits
78c27c95
Commit
78c27c95
authored
Jun 03, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactory Project Current
parent
9370584b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
SelectProject.js
src/@core/layouts/components/navbar/SelectProject.js
+2
-2
index.js
src/redux/actions/navbar/index.js
+1
-1
index.js
src/redux/reducers/navbar/index.js
+1
-1
No files found.
src/@core/layouts/components/navbar/SelectProject.js
View file @
78c27c95
...
...
@@ -3,7 +3,7 @@ import AsyncSelect from 'react-select/async'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
selectThemeColors
}
from
'@utils'
import
{
getData_projects
}
from
'@src/views/settings/store/actions'
import
{
handleProject
Selected
}
from
'@store/actions/navbar'
import
{
handleProject
Current
}
from
'@store/actions/navbar'
//
...
...
@@ -29,7 +29,7 @@ const SelectProject = props => {
}
const
handleChange
=
value
=>
{
console
.
log
(
value
)
dispatch
(
handleProject
Selected
(
value
))
dispatch
(
handleProject
Current
(
value
))
}
useEffect
(()
=>
{
...
...
src/redux/actions/navbar/index.js
View file @
78c27c95
...
...
@@ -24,4 +24,4 @@ export const updateBookmarked = id => {
// ** Handle Bookmarks & Main Search Queries
export
const
handleSearchQuery
=
val
=>
dispatch
=>
dispatch
({
type
:
'HANDLE_SEARCH_QUERY'
,
val
})
export
const
handleProject
Selected
=
val
=>
dispatch
=>
dispatch
({
type
:
'HANDLE_PROJECT_SELECTED
'
,
val
})
export
const
handleProject
Current
=
val
=>
dispatch
=>
dispatch
({
type
:
'HANDLE_PROJECT_CURRENT
'
,
val
})
src/redux/reducers/navbar/index.js
View file @
78c27c95
...
...
@@ -10,7 +10,7 @@ const navbarReducer = (state = initialState, action) => {
switch
(
action
.
type
)
{
case
'HANDLE_SEARCH_QUERY'
:
return
{
...
state
,
query
:
action
.
val
}
case
'HANDLE_PROJECT_
SELECTED
'
:
case
'HANDLE_PROJECT_
CURRENT
'
:
return
{
...
state
,
projectCurrent
:
action
.
val
}
case
'GET_BOOKMARKS'
:
return
{
...
state
,
suggestions
:
action
.
data
,
bookmarks
:
action
.
bookmarks
}
...
...
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