diff --git a/components/Authentication/Authentication.module.css b/components/Authentication/Authentication.module.css index 342723d..14d3cbb 100644 --- a/components/Authentication/Authentication.module.css +++ b/components/Authentication/Authentication.module.css @@ -1,7 +1,10 @@ .favicon { position: relative; top: 5px; - margin-left: 10px; + max-width: 250px; + max-height: 250px; + width: 100%; + height: 100%; } /* googleBtn */ diff --git a/components/Authentication/SignInForm.js b/components/Authentication/SignInForm.js index 9fcb74b..41a4864 100644 --- a/components/Authentication/SignInForm.js +++ b/components/Authentication/SignInForm.js @@ -8,6 +8,7 @@ import Button from "@mui/material/Button"; import FormControlLabel from "@mui/material/FormControlLabel"; import Checkbox from "@mui/material/Checkbox"; import styles from "@/components/Authentication/Authentication.module.css"; +import WrenchBoardLogo from "@/public/images/logos/wrenchboard-logo.png"; const SignInForm = () => { const handleSubmit = (event) => { @@ -33,47 +34,21 @@ const SignInForm = () => { > - - Sign In{" "} + favicon - - - {/* - Already have an account?{" "} - - Sign up - - - - - - - Sign in with Google - - - - - Sign in with Facebook - - -
- or -
*/} + + Sign In{" "} + { const router = useRouter(); const [active, setActive] = useState(false); - const isAuthenticated = false; // Replace with your authentication logic const toggleActive = () => { setActive(!active); @@ -26,12 +25,12 @@ const Layout = ({ children }) => { "/authentication/logout", ].includes(router.pathname); + const title = isAuthenticationPage ? "CMC - Authentication" : "CMC - Client"; + return ( <> - - {isAuthenticated ? "CMC - Client" : "CMC - Authentication"} - + {title} diff --git a/components/_App/LeftSidebar/index.js b/components/_App/LeftSidebar/index.js index 2726187..1db8c0a 100644 --- a/components/_App/LeftSidebar/index.js +++ b/components/_App/LeftSidebar/index.js @@ -46,13 +46,13 @@ const Sidebar = ({ toogleActive }) => { > Logo {/* For Dark Variation */} Logo diff --git a/middlewares/AuthRoute.js b/middlewares/AuthRoute.js index c8e0748..ebccbf3 100644 --- a/middlewares/AuthRoute.js +++ b/middlewares/AuthRoute.js @@ -1,20 +1,21 @@ -"use client" +"use client"; import { useEffect } from "react"; import { useRouter } from "next/router"; /** - * This is used to protect routes in a web application. + * This function is used to protect routes in a web application. * It checks if the user is authenticated and redirects them to the sign-in page if they are not. + */ const AuthRoute = ({ children }) => { const router = useRouter(); useEffect(() => { - const isAuthenticated = false; // In a real application, this would be determined based on the user's authentication status. + const isAuthenticated = true; // In a real application, this would be determined based on the user's authentication status. if (!isAuthenticated) { router.push("/authentication/sign-in/"); - } + } }, [router]); return <>{children}; diff --git a/pages/_app.js b/pages/_app.js index 779b3c8..357fad2 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -3,7 +3,6 @@ import '../styles/remixicon.css' import 'react-tabs/style/react-tabs.css'; import "swiper/css"; import "swiper/css/bundle"; - // Chat Styles import '../styles/chat.css' // Globals Styles @@ -19,6 +18,7 @@ import { ThemeProvider, CssBaseline } from "@mui/material"; import Layout from "@/components/_App/Layout"; function MyApp({ Component, pageProps }) { + return ( <> diff --git a/pages/_document.js b/pages/_document.js index 0473ec7..5163bb8 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -7,11 +7,32 @@ class MyDocument extends Document { return ( - - + + {/* Icons */} + + + + +
diff --git a/pages/index.js b/pages/index.js index 2883faf..9c2b14d 100644 --- a/pages/index.js +++ b/pages/index.js @@ -15,7 +15,6 @@ import RecentOrders from "@/components/Dashboard/eCommerce/RecentOrders"; import TeamMembersList from "@/components/Dashboard/eCommerce/TeamMembersList"; import BestSellingProducts from "@/components/Dashboard/eCommerce/BestSellingProducts"; import LiveVisitsOnOurSite from "@/components/Dashboard/eCommerce/LiveVisitsOnOurSite"; -import AuthRoute from "middlewares/AuthRoute"; function MainPage() { return ( diff --git a/public/images/icons/android-chrome-192x192.png b/public/images/icons/android-chrome-192x192.png new file mode 100644 index 0000000..8a76d74 Binary files /dev/null and b/public/images/icons/android-chrome-192x192.png differ diff --git a/public/images/icons/android-chrome-512x512.png b/public/images/icons/android-chrome-512x512.png new file mode 100644 index 0000000..00ebe36 Binary files /dev/null and b/public/images/icons/android-chrome-512x512.png differ diff --git a/public/images/icons/apple-touch-icon.png b/public/images/icons/apple-touch-icon.png new file mode 100644 index 0000000..105ee0a Binary files /dev/null and b/public/images/icons/apple-touch-icon.png differ diff --git a/public/images/icons/favicon-16x16.png b/public/images/icons/favicon-16x16.png new file mode 100644 index 0000000..c6e2554 Binary files /dev/null and b/public/images/icons/favicon-16x16.png differ diff --git a/public/images/icons/favicon.ico b/public/images/icons/favicon.ico new file mode 100644 index 0000000..9556081 Binary files /dev/null and b/public/images/icons/favicon.ico differ diff --git a/public/images/logos/wrenchboard-logo.png b/public/images/logos/wrenchboard-logo.png new file mode 100644 index 0000000..51a5933 Binary files /dev/null and b/public/images/logos/wrenchboard-logo.png differ