Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 12049 | Rev 15066 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
12012 stevensc 1
import React, { useState } from 'react'
11960 stevensc 2
import { BrowserRouter, Route, Switch } from 'react-router-dom'
3
import ContentTitle from '../../../shared/ContentTitle'
12012 stevensc 4
import AddView from '../views/AddView'
5
import EditView from '../views/EditView'
11960 stevensc 6
import TableView from '../views/TableView'
7
 
11964 stevensc 8
const Routes = ({ backendVars }) => {
11960 stevensc 9
 
12012 stevensc 10
	const [actionLink, setActionLink] = useState(backendVars.add_link)
11
 
11960 stevensc 12
	return (
13
		<BrowserRouter>
14
			<ContentTitle title='Evaluación de desempeño'>
15
				<Switch>
12020 stevensc 16
					<Route exact path='/performance-evaluation/forms'>
12012 stevensc 17
						<TableView {...backendVars} actionLink={actionLink} setActionLink={setActionLink} />
11965 stevensc 18
					</Route>
12020 stevensc 19
					<Route exact path='/performance-evaluation/forms/edit' >
12135 stevensc 20
						<EditView
21
							actionLink={actionLink}
22
						/>
12012 stevensc 23
					</Route>
12020 stevensc 24
					<Route exact path='/performance-evaluation/forms/add'>
12135 stevensc 25
						<AddView
26
							actionLink={actionLink}
27
							jobsDescription={backendVars.jobsDescription}
28
						/>
12012 stevensc 29
					</Route>
11960 stevensc 30
				</Switch>
31
			</ContentTitle>
32
		</BrowserRouter>
33
	)
34
}
35
 
36
export default Routes