Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!