Proyectos de Subversion LeadersLinked - Backend

Rev

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

import React, { useState } from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import ContentTitle from '../../../shared/ContentTitle'
import TableView from '../views/TableView'
import EvaluationView from '../views/EvaluationView'

const Routes = ({ backendVars }) => {

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

        return (
                <BrowserRouter>
                        <ContentTitle title='Pruebas'>
                                <Switch>
                                        <Route exact path='/performance-evaluation/evaluations'>
                                                <TableView {...backendVars} actionLink={actionLink} setActionLink={setActionLink} />
                                        </Route>
                                        <Route path='/performance-evaluation/evaluations/:action' >
                                                <EvaluationView
                                                        actionLink={actionLink}
                                                        setActionLink={setActionLink}
                                                />
                                        </Route>
                                </Switch>
                        </ContentTitle>
                </BrowserRouter>
        )
}

export default Routes