Create a New Page
-> Follow the below steps to create new page.
1. Create a new folder in src/pages. ex. NewPage, and then create a ts file in src/pages/NewPage with name Index.tsx file.
Layout Components
import React from 'react';
import { Container } from "reactstrap";
//Import Breadcrumb
import Breadcrumb from 'Components/Common/Breadcrumb';
const NewPage = () => {
//meta title
document.title="New Page | Skote - React Admin & Dashboard Template";
return (
<>
<div className="page-content">
<Container fluid>
<Breadcrumbs title="New Page" breadcrumbItem="New Page" />
{/* write Html code or structure */}
</Container>
</div>
</>
);
}
export default NewPage;
Without Layout Components
import React from 'react';
import { Container } from 'react-bootstrap';
const AuthLogIn = () => {
document.title = "Log In| Skote - Admin & Dashboard Template";
return (
<React.Fragment>
<div>
<Container>
// write the code here...
</Container>
</div>
</React.Fragment>
)
}
export default AuthLogIn;
2. Add your new page's route in src/Routes/allRoutes.tsx file.
import newPage from "../pages/AuthLogIn";
const publicRoutes = [
{ path: "/auth-login", component: <AuthLogIn /> }
]
import newPage from "../pages/NewPage/index";
const authProtectedRoutes = [
{ path: "/index", component: <Index /> }
]