I am using Ant Design for creating layout for my react application. I have created separate components for Header, SideBar, FooterComp and included them all in App.js. The code is as below:
import React from "react";
import { Layout } from "antd";
import "./App.css";
import { NavBar } from "./components/Header";
import { SideBar } from "./components/Sidebar";
import { FooterComp } from "./components/Footer";
const { Content } = Layout;
const App = () => {
return (
<Layout>
<SideBar />
<Layout className="site-layout">
<NavBar />
<Content
className="site-layout-background"
style={{
margin: "24px 16px",
padding: 24,
minHeight: 487,
}}
>
Content
</Content>
<FooterComp />
</Layout>
</Layout>
);
};
export default App;
Now, I want to use React Router and render the components inside Content. How do I achieve that ? Also, I will be creating two more components i.e. for Login and Registration. I do not want layout to appear for these two components.