Commit 78c27c95 authored by PDuarte's avatar PDuarte

refactory Project Current

parent 9370584b
...@@ -3,7 +3,7 @@ import AsyncSelect from 'react-select/async' ...@@ -3,7 +3,7 @@ import AsyncSelect from 'react-select/async'
import { useSelector, useDispatch } from 'react-redux' import { useSelector, useDispatch } from 'react-redux'
import { selectThemeColors } from '@utils' import { selectThemeColors } from '@utils'
import { getData_projects } from '@src/views/settings/store/actions' import { getData_projects } from '@src/views/settings/store/actions'
import { handleProjectSelected } from '@store/actions/navbar' import { handleProjectCurrent } from '@store/actions/navbar'
// //
...@@ -29,7 +29,7 @@ const SelectProject = props => { ...@@ -29,7 +29,7 @@ const SelectProject = props => {
} }
const handleChange = value => { const handleChange = value => {
console.log(value) console.log(value)
dispatch(handleProjectSelected(value)) dispatch(handleProjectCurrent(value))
} }
useEffect(() => { useEffect(() => {
......
...@@ -24,4 +24,4 @@ export const updateBookmarked = id => { ...@@ -24,4 +24,4 @@ export const updateBookmarked = id => {
// ** Handle Bookmarks & Main Search Queries // ** Handle Bookmarks & Main Search Queries
export const handleSearchQuery = val => dispatch => dispatch({ type: 'HANDLE_SEARCH_QUERY', val }) export const handleSearchQuery = val => dispatch => dispatch({ type: 'HANDLE_SEARCH_QUERY', val })
export const handleProjectSelected = val => dispatch => dispatch({ type: 'HANDLE_PROJECT_SELECTED', val }) export const handleProjectCurrent = val => dispatch => dispatch({ type: 'HANDLE_PROJECT_CURRENT', val })
...@@ -10,7 +10,7 @@ const navbarReducer = (state = initialState, action) => { ...@@ -10,7 +10,7 @@ const navbarReducer = (state = initialState, action) => {
switch (action.type) { switch (action.type) {
case 'HANDLE_SEARCH_QUERY': case 'HANDLE_SEARCH_QUERY':
return { ...state, query: action.val } return { ...state, query: action.val }
case 'HANDLE_PROJECT_SELECTED': case 'HANDLE_PROJECT_CURRENT':
return { ...state, projectCurrent: action.val } return { ...state, projectCurrent: action.val }
case 'GET_BOOKMARKS': case 'GET_BOOKMARKS':
return { ...state, suggestions: action.data, bookmarks: action.bookmarks } return { ...state, suggestions: action.data, bookmarks: action.bookmarks }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment