Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 9907 | Rev 14838 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import React, { useState } from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import ContentTitle from '../../../shared/ContentTitle'
import FormView from '../views/FormView'
import MainView from '../views/MainView'


const VacanciesRoutes = ({ backendVars }) => {

    const [actionLink, setActionLink] = useState(backendVars.add_link)

    return (
        <Router>
            <ContentTitle title="Reclutamiento y Selección">
                <Switch>
                    <Route
                        exact path='/recruitment-and-selection/vacancies'
                        component={() =>
                            <MainView
                                {...backendVars}
                                setActionLink={setActionLink}
                            />
                        }
                    />
                    <Route
                        path='/recruitment-and-selection/vacancies/:action'
                        component={() => <FormView actionLink={actionLink} googleApiKey={backendVars.googleApiKey} />}
                    />
                </Switch>
            </ContentTitle>
        </Router>
    )
}
export default VacanciesRoutes