Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 12491 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
12475 stevensc 1
import React, { useState } from 'react'
12491 stevensc 2
import { BrowserRouter, Route, Switch } from 'react-router-dom'
12475 stevensc 3
import ContentTitle from '../../../shared/ContentTitle'
12709 stevensc 4
import FormView from '../views/FormView'
12475 stevensc 5
import TableView from '../views/TableView'
6
 
12487 stevensc 7
const Routes = ({ backendVars }) => {
12475 stevensc 8
 
9
	const [actionLink, setActionLink] = useState('')
10
 
11
	return (
12491 stevensc 12
		<BrowserRouter>
13
			<ContentTitle title='Generador de Formularios'>
12490 stevensc 14
				<Switch>
12491 stevensc 15
					<Route exact path='/organizational-climate/form'>
16
						<TableView
17
							actionLink={actionLink}
18
							setActionLink={setActionLink}
19
							{...backendVars}
20
						/>
12490 stevensc 21
					</Route>
12709 stevensc 22
					<Route exact path='/organizational-climate/form/:action'>
23
						<FormView
24
							actionLink={actionLink}
25
							setActionLink={setActionLink}
26
							{...backendVars}
27
						/>
28
					</Route>
12490 stevensc 29
				</Switch>
30
			</ContentTitle>
12491 stevensc 31
		</BrowserRouter>
12475 stevensc 32
	)
33
}
34
 
35
export default Routes