Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
don't want the layout component inside a login route

I want to create a login/sign-up page in my application with react but in the router section. I don't want my login page to have the layout component which I have created for every other page that my app renders. All the routes that you see below have the layout component inside them but for the login page, I don't want the layout inside the login page. My layout component has a sidebar and a topbar built inside it which is irrelevant for the login page. That's the reason I don't want it on login or sign-up pages.

import Dashboard from "./Pages/Dashboard/Dashboard";
import Wallets from "./Pages/Wallets";
import Crypto_transactions from "./Pages/Crypto_transactions";
import Rial_transactions from "./Pages/Rial_transactions";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Layout from "./Pages/Layout";
import Tickets from "./Pages/Tickets";
import Buy from "./Pages/Buy";
import Sell from "./Pages/Sell";
import Orders from "./Pages/Orders";
import Open_transactions from "./Pages/Open_transactions";
import Trade_logs from "./Pages/Trade_logs";
import Credit_cards from "./Pages/Credit_cards";
import Invitation from "./Pages/Invitation";
import Authentication from "./Pages/Authentication";
import Password from "./Pages/Password";
import Login from "./Pages/Login";

function App() {
    return (
        <BrowserRouter>
            <Layout></Layout>
            <Routes>
                <Route path="/" element={<Dashboard />} />
                <Route path="wallets" element={<Wallets />} />
                <Route path="crypto-transactions" element={<Crypto_transactions />} />
                <Route path="rial-transactions" element={<Rial_transactions />} />
                <Route path="tickets" element={<Tickets />} />
                <Route path="buy" element={<Buy />} />
                <Route path="sell" element={<Sell />} />
                <Route path="orders" element={<Orders />} />
                <Route path="open-transactions" element={<Open_transactions />} />
                <Route path="trade-logs" element={<Trade_logs />} />
                <Route path="credit-cards" element={<Credit_cards     />} />
                <Route path="invitation" element={<Invitation />} />
                <Route path="authentication" element={<Authentication />} />
                <Route path="password" element={<Password />} />
            </Routes>
        </BrowserRouter>
    );
}

export default App;
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda