Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 13007 | Rev 13067 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 13007 Rev 13008
Línea 224... Línea 224...
224
		reset()
224
		reset()
225
		history.goBack()
225
		history.goBack()
226
	}
226
	}
Línea 227... Línea 227...
227
 
227
 
-
 
228
	useEffect(() => {
-
 
229
		register('text')
-
 
230
		register('description')
-
 
231
	}, [])
-
 
232
 
228
	useEffect(() => {
233
	useEffect(() => {
229
		if (action === 'edit') {
234
		if (action === 'edit') {
230
			axios.get(actionLink)
235
			axios.get(actionLink)
231
				.then(({ data }) => {
236
				.then(({ data }) => {
232
					if (!data.success) {
237
					if (!data.success) {
233
						return dispatch(addNotification({
238
						return dispatch(addNotification({
234
							style: 'danger',
239
							style: 'danger',
235
							msg: 'Ha ocurrido un error'
240
							msg: 'Ha ocurrido un error'
236
						}))
241
						}))
Línea -... Línea 242...
-
 
242
					}
-
 
243
 
-
 
244
					register('text')
-
 
245
					register('description')
-
 
246
 
-
 
247
					setContent(data.data.content)
237
					}
248
					setStatus(data.data.status)
238
 
249
 
239
					setValue('name', data.data.name)
250
					setValue('name', data.data.name)
240
					setValue('description', data.data.description)
-
 
241
					setValue('text', data.data.description)
-
 
242
					setContent(data.data.content)
251
					setValue('description', data.data.description)
243
					setStatus(data.data.status)
252
					setValue('text', data.data.description)
244
				})
253
				})
Línea -... Línea 254...
-
 
254
		}
245
		}
255
	}, [actionLink])
246
	}, [actionLink])
256
 
247
 
257
 
248
	return (
258
	return (
249
		<>
259
		<>