Commit d15eb195 authored by PDuarte's avatar PDuarte

realese 1

parent 6a91e7bd
......@@ -53,11 +53,12 @@ const ProjectsEdit = () => {
useEffect(() => {
console.log('eff')
console.log(storeSettings.selectedProject)
if (storeSettings.selectedProject === null || storeSettings.selectedProject.data.id !== id) store.dispatch(getProject(parseInt(id)))
// if (storeSettings.selectedProject === null && storeSettings.selectedProject !== undefined)
store.dispatch(getProject(parseInt(id)))
}, [dispatch])
return storeSettings.selectedProject !== null && storeSettings.selectedProject !== undefined && storeSettings.selectedProject.id === id ? (
return storeSettings.selectedProject !== null && storeSettings.selectedProject !== undefined ? (
<Row>
<Col sm='12'>
<Form onSubmit={handleSubmit(onSubmit)}>
......
......@@ -17,7 +17,7 @@ const initialState = {
totalPlatforms: 1,
paramsPlatforms: {},
allDataPlatforms: [],
selectedPlatform: {}
selectedPlatform: null
}
const Settings = (state = initialState, action) => {
......@@ -44,6 +44,7 @@ const Settings = (state = initialState, action) => {
case 'GET_DATA_PROJECTS':
return {
...state,
allDataProjects: action.allData,
......@@ -53,8 +54,8 @@ const Settings = (state = initialState, action) => {
}
case 'GET_PROJECT':
return { ...state,
selectedProject: action.selectedProject
return { ...state,
selectedProject : action.selectedProject
}
case 'UPDATE_PROJECT':
......
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