Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
10447 stevensc 1
import React, { useState } from 'react'
10457 stevensc 2
import { Route, Switch, useRouteMatch } from 'react-router-dom'
10438 stevensc 3
import ContentTitle from '../../../shared/ContentTitle'
10436 stevensc 4
import FormView from './FormView'
5
import TableView from './TableView'
10425 stevensc 6
 
10436 stevensc 7
const MainView = ({ backendVars }) => {
10425 stevensc 8
 
10753 stevensc 9
	const { add_link } = backendVars
10
	const [actionLink, setAcctionLink] = useState(add_link)
10457 stevensc 11
	const { path } = useRouteMatch()
10447 stevensc 12
 
13
	return (
14
		<ContentTitle title="Entrevistas">
15
			<Switch>
10457 stevensc 16
				<Route path={`${path}/:action`} >
17
					<FormView {...backendVars} actionLink={actionLink} />
18
				</Route>
19
				<Route exact path={`${path}`}>
10840 stevensc 20
					<TableView {...backendVars} setActionLink={setAcctionLink} />
10457 stevensc 21
				</Route>
10447 stevensc 22
			</Switch>
23
		</ContentTitle >
24
	)
10425 stevensc 25
}
26
export default MainView