Proyectos de Subversion LeadersLinked - Backend

Rev

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

import React from 'react'
import { useState } from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import FormView from '../view/FormView'
import TableView from '../view/TableView'

const ViewsRouter = ({ backendVars }) => {

        const [actionLink, setActionLink] = useState('')

        return (
                <BrowserRouter>
                        <Switch>
                                <Route exact path='/settings/jobs-description/:action' >
                                        <FormView
                                                actionLink={actionLink}
                                                setActionLink={setActionLink}
                                                {...backendVars}
                                        />
                                </Route>
                                <Route exatc path='/settings/jobs-description' >
                                        <TableView
                                                actionLink={actionLink}
                                                setActionLink={setActionLink}
                                                {...backendVars}
                                        />
                                </Route>
                        </Switch>
                </BrowserRouter>
        )
}

export default ViewsRouter