Home Page Customization
This commit is contained in:
@@ -33,7 +33,7 @@ const SignInForm = () => {
|
||||
>
|
||||
<Grid item xs={12} md={12} lg={12} xl={12}>
|
||||
<Box>
|
||||
<Typography as="h1" fontSize="28px" fontWeight="700" mb="5px">
|
||||
<Typography as="h1" fontSize="28px" fontWeight="700" mb="65px">
|
||||
Sign In{" "}
|
||||
<img
|
||||
src="/images/favicon.png"
|
||||
@@ -42,7 +42,7 @@ const SignInForm = () => {
|
||||
/>
|
||||
</Typography>
|
||||
|
||||
<Typography fontSize="15px" mb="30px">
|
||||
{/* <Typography fontSize="15px" mb="30px">
|
||||
Already have an account?{" "}
|
||||
<Link
|
||||
href="/authentication/sign-up"
|
||||
@@ -73,7 +73,7 @@ const SignInForm = () => {
|
||||
|
||||
<div className={styles.or}>
|
||||
<span>or</span>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<Box component="form" noValidate onSubmit={handleSubmit}>
|
||||
<Box
|
||||
|
||||
+28
-43
@@ -6,68 +6,53 @@ import TopNavbar from "@/components/_App/TopNavbar";
|
||||
import Footer from "@/components/_App/Footer";
|
||||
import ScrollToTop from "./ScrollToTop";
|
||||
import ControlPanelModal from "./ControlPanelModal";
|
||||
import AuthRoute from "middlewares/AuthRoute";
|
||||
|
||||
const Layout = ({ children }) => {
|
||||
const router = useRouter();
|
||||
|
||||
const [active, setActive] = useState(false);
|
||||
const isAuthenticated = false; // Replace with your authentication logic
|
||||
|
||||
const toogleActive = () => {
|
||||
const toggleActive = () => {
|
||||
setActive(!active);
|
||||
};
|
||||
|
||||
const isAuthenticationPage = [
|
||||
"/authentication/sign-in",
|
||||
"/authentication/sign-up",
|
||||
"/authentication/forgot-password",
|
||||
"/authentication/lock-screen",
|
||||
"/authentication/confirm-mail",
|
||||
"/authentication/logout",
|
||||
].includes(router.pathname);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>
|
||||
CMC - Client
|
||||
{isAuthenticated ? "CMC - Client" : "CMC - Authentication"}
|
||||
</title>
|
||||
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
||||
</Head>
|
||||
|
||||
<div className={`main-wrapper-content ${active && "active"}`}>
|
||||
{!(
|
||||
router.pathname === "/authentication/sign-in" ||
|
||||
router.pathname === "/authentication/sign-up" ||
|
||||
router.pathname === "/authentication/forgot-password" ||
|
||||
router.pathname === "/authentication/lock-screen" ||
|
||||
router.pathname === "/authentication/confirm-mail" ||
|
||||
router.pathname === "/authentication/logout"
|
||||
) && (
|
||||
<>
|
||||
<TopNavbar toogleActive={toogleActive} />
|
||||
<AuthRoute>
|
||||
<div className={`main-wrapper-content ${active ? "active" : ""}`}>
|
||||
{!isAuthenticationPage && (
|
||||
<>
|
||||
<TopNavbar toggleActive={toggleActive} />
|
||||
<LeftSidebar toggleActive={toggleActive} />
|
||||
</>
|
||||
)}
|
||||
|
||||
<LeftSidebar toogleActive={toogleActive} />
|
||||
</>
|
||||
)}
|
||||
<div className="main-content">{children}</div>
|
||||
|
||||
<div className="main-content">
|
||||
{children}
|
||||
|
||||
{!(
|
||||
router.pathname === "/authentication/sign-in" ||
|
||||
router.pathname === "/authentication/sign-up" ||
|
||||
router.pathname === "/authentication/forgot-password" ||
|
||||
router.pathname === "/authentication/lock-screen" ||
|
||||
router.pathname === "/authentication/confirm-mail" ||
|
||||
router.pathname === "/authentication/logout"
|
||||
) && <Footer />}
|
||||
{!isAuthenticationPage && <Footer />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ScrollToTop */}
|
||||
<ScrollToTop />
|
||||
|
||||
{!(
|
||||
router.pathname === "/authentication/sign-in" ||
|
||||
router.pathname === "/authentication/sign-up" ||
|
||||
router.pathname === "/authentication/forgot-password" ||
|
||||
router.pathname === "/authentication/lock-screen" ||
|
||||
router.pathname === "/authentication/confirm-mail" ||
|
||||
router.pathname === "/authentication/logout"
|
||||
) &&
|
||||
<ControlPanelModal />
|
||||
}
|
||||
|
||||
<ScrollToTop />
|
||||
|
||||
{!isAuthenticationPage && <ControlPanelModal />}
|
||||
</AuthRoute>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user