Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 9802 | Rev 9907 | 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
9812 stevensc 21
                        path='/recruitment-and-selection/vacancies/:action'
9779 stevensc 22
                        component={() => <FormView actionLink={actionLink} googleApiKey={backendVars.googleApiKey} />}
9682 stevensc 23
                    />
9469 stevensc 24
                </Switch>
25
            </ContentTitle>
26
        </Router>
27
    )
28
}
29
export default VacanciesRoutes