|
|
|
|
|
|
|
|
import Navbar from "../../components/MUI/NavbarComponent"; |
|
|
import Navbar from "../../components/MUI/NavbarComponent"; |
|
|
// import AppRoutes from "../../AppRoutes"; |
|
|
// import AppRoutes from "../../AppRoutes"; |
|
|
|
|
|
|
|
|
|
|
|
const urls = ["/", "/login", "/forgot-password", "/reset-password",'/forgot-password-confirmation','/error-page']; |
|
|
|
|
|
|
|
|
const MainContainer = ({ children }) => { |
|
|
const MainContainer = ({ children }) => { |
|
|
const { pathname } = useLocation(); |
|
|
const { pathname } = useLocation(); |
|
|
|
|
|
|
|
|
return pathname !== "/" && pathname !== "/login" ? ( |
|
|
|
|
|
|
|
|
return urls.includes(pathname) ? ( |
|
|
|
|
|
<div className="">{children}</div> |
|
|
|
|
|
) : ( |
|
|
<div className=""> |
|
|
<div className=""> |
|
|
<Navbar /> |
|
|
<Navbar /> |
|
|
<div className="h-withHeader"> |
|
|
|
|
|
{children} |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div className="h-withHeader">{children}</div> |
|
|
</div> |
|
|
</div> |
|
|
) : ( |
|
|
|
|
|
<div className="">{children}</div> |
|
|
|
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|