Commit d15eb195 authored by PDuarte's avatar PDuarte

realese 1

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