Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 9812 | Rev 9929 | 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'
9907 stevensc 18
                        component={() =>
19
                            <MainView
20
                                {...backendVars}
21
                                setActionLink={setActionLink}
22
                                actionLink={actionLink} />
23
                        }
9618 stevensc 24
                    />
9682 stevensc 25
                    <Route
9812 stevensc 26
                        path='/recruitment-and-selection/vacancies/:action'
9779 stevensc 27
                        component={() => <FormView actionLink={actionLink} googleApiKey={backendVars.googleApiKey} />}
9682 stevensc 28
                    />
9469 stevensc 29
                </Switch>
30
            </ContentTitle>
31
        </Router>
32
    )
33
}
34
export default VacanciesRoutes