Erro no Switch

devjoao98

João Pedro

Posted on January 10, 2022

Erro no Switch
export default function Routes(){
    return(
        <BrowserRouter>
            <Switch>
                {/* Rota Client*/}
                <Route path='/' exact component={Home} />
                <Route path='/produtos/:idProduto' exact component={ProdutoDeteils} />

                {/* Rota Admin*/}
                <Route path='/admin' exact component={Dashboard} />

                <Route path='/admin/produtos' exact component={Produtos} />
                <Route path='/admin/produtos/cadastrar' exact component={ProdutoCadastrar} />
                <Route path='/admin/produtos/editar/:idProduto' exact component={ProdutoEditar} />

                <Route path='/admin/usuarios' exact component={Usuarios} />
                <Route path='/admin/usuarios/cadastrar' exact component={UsuarioCadastrar} />
                <Route path='/admin/usuarios/editar/:idUsuarios' exact component={UsuarioEditar} />
            </Switch>
        </BrowserRouter>
    )
}
Enter fullscreen mode Exit fullscreen mode

}

💖 💪 🙅 🚩
devjoao98
João Pedro

Posted on January 10, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related