Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 10438 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 10438 Rev 10447
Línea 1... Línea 1...
1
import React from 'react'
1
import React, { useState } from 'react'
2
import { Route, Switch } from 'react-router-dom'
2
import { Route, Switch } from 'react-router-dom'
3
import ContentTitle from '../../../shared/ContentTitle'
3
import ContentTitle from '../../../shared/ContentTitle'
4
import FormView from './FormView'
4
import FormView from './FormView'
5
import TableView from './TableView'
5
import TableView from './TableView'
Línea 6... Línea 6...
6
 
6
 
Línea -... Línea 7...
-
 
7
const MainView = ({ backendVars }) => {
-
 
8
 
7
const MainView = ({ backendVars }) => {
9
	const [actionLink, setAcctionLink] = useState()
8
 
10
 
9
    return (
11
	return (
10
        <ContentTitle title="Entrevistas">
12
		<ContentTitle title="Entrevistas">
11
            <Switch>
13
			<Switch>
12
                <Route
14
				<Route
13
                    exact path='/recruitment-and-selection/interview/form'
15
					exact path='/recruitment-and-selection/interview/form'
14
                    component={() => <TableView {...backendVars} />}
16
					component={() => <TableView {...backendVars} setActionLink={setAcctionLink} />}
15
                />
17
				/>
16
                <Route
18
				<Route
17
                    exact path='/recruitment-and-selection/interview/form/:action'
19
					exact path='/recruitment-and-selection/interview/form/:action'
18
                    component={() => <FormView {...backendVars} />}
20
					component={() => <FormView {...backendVars} actionLink={actionLink} />}
19
                />
21
				/>
20
            </Switch>
22
			</Switch>
21
        </ContentTitle >
23
		</ContentTitle >
22
    )
24
	)
23
}
25
}