Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
9618 stevensc 1
import React, { useState } from 'react'
9469 stevensc 2
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
3
import ContentTitle from '../../../shared/ContentTitle'
4
import FormView from '../views/FormView'
5
import MainView from '../views/MainView'
6
 
7
 
8
const VacanciesRoutes = ({ backendVars }) => {
9618 stevensc 9
 
9802 stevensc 10
    const [actionLink, setActionLink] = useState(backendVars.add_link)
9618 stevensc 11
 
9469 stevensc 12
    return (
13
        <Router>
14
            <ContentTitle title="Reclutamiento y Selección">
15
                <Switch>
9618 stevensc 16
                    <Route
17
                        exact path='/recruitment-and-selection/vacancies'
9620 stevensc 18
                        component={() => <MainView {...backendVars} setActionLink={setActionLink} />}
9618 stevensc 19
                    />
9682 stevensc 20
                    <Route
9691 stevensc 21
                        path='/recruitment-and-selection/vacancies/edit'
9779 stevensc 22
                        component={() => <FormView actionLink={actionLink} googleApiKey={backendVars.googleApiKey} />}
9682 stevensc 23
                    />
24
                    <Route
9691 stevensc 25
                        path='/recruitment-and-selection/vacancies/add'
9779 stevensc 26
                        component={<FormView actionLink={actionLink} googleApiKey={backendVars.googleApiKey} />}
9682 stevensc 27
                    />
9469 stevensc 28
                </Switch>
29
            </ContentTitle>
30
        </Router>
31
    )
32
}
33
export default VacanciesRoutes