}
+ svgLeft={
}
bordered
placeholder="Enter your firstname"
value={firstname}
@@ -58,7 +60,7 @@ export const SignUpForm = () => {
/>
}
+ svgLeft={
}
bordered
placeholder="Enter your lastname"
value={lastname}
@@ -69,7 +71,7 @@ export const SignUpForm = () => {
/>
}
+ svgLeft={
}
bordered
placeholder="Enter your email"
value={email}
diff --git a/src/welcome/WelcomeRoot.tsx b/src/welcome/WelcomeRoot.tsx
index 48806384..5b4572f1 100644
--- a/src/welcome/WelcomeRoot.tsx
+++ b/src/welcome/WelcomeRoot.tsx
@@ -1,43 +1,54 @@
+import React, { useEffect, useState, useMemo } from "react";
import { Route, Routes, useLocation, useNavigate } from "react-router-dom";
import { SignUpForm } from "./SignUpForm";
import ForgotPasswordForm from "./ForgotPasswordForm";
import ChangePasswordForm from "./ChangePasswordForm";
-import { SignIn as SignInImage, SignUp as SignUpImage, ArrowBack } from "../assets";
+import { SignIn as SignInImage, SignUp as SignUpImage, SignInUpDark as SignUpImageDark, signIndark as SignInImageDark, ArrowBack } from "../assets";
import { SignInForm } from "./SignInForm";
const Welcome = () => {
const location = useLocation();
const navigate = useNavigate();
+ const [isDark, setIsDark] = useState(localStorage.getItem("theme") === "dark");
- const getImage = () => {
- let imageComponent;
- switch (location.pathname) {
- case "/sign-in":
- imageComponent =
;
- break;
- case "/sign-up":
- imageComponent =
;
- break;
- default:
- imageComponent =
;
+ useEffect(() => {
+ const handleStorageChange = () => {
+ setIsDark(localStorage.getItem("theme") === "dark");
+ };
+
+ window.addEventListener("storage", handleStorageChange);
+ return () => window.removeEventListener("storage", handleStorageChange);
+ }, []);
+
+ const getImage = useMemo(() => {
+ if (location.pathname === "/sign-up") {
+ return isDark ? (
+
+ ) : (
+
+ );
}
- return
{imageComponent}
;
- };
+ return isDark ? (
+
+ ) : (
+
+ );
+ }, [location.pathname, isDark]);
const classLink = "text-gray-600 hover:underline hover:text-indigo-800 cursor-pointer";
return (
-
+
- {getImage()}
+
{getImage}
-
-
{/* Reduced padding */}
+
+
} />
} />
@@ -46,28 +57,42 @@ const Welcome = () => {
} />
-
+
+
{location.pathname !== "/sign-up" && location.pathname !== "/legal-mention" && (
-
navigate("/sign-up")} className={classLink}>
+ navigate("/sign-up")}
+ className={`${classLink} dark:text-white dark:hover:text-indigo-300`}
+ >
Don’t have an account?
)}
- {location.pathname !== "/" && (
- location.pathname === "/legal-mention" ? (
- navigate("/")} className="flex items-center gap-2 cursor-pointer">
-
-
Back
-
- ) : (
- navigate("/")} className={classLink}>
- Already have an account?
+ {location.pathname === "/legal-mention" ? (
+ navigate("/")}
+ className="flex items-center gap-2 cursor-pointer"
+ >
+
+
+ Back
- )
+
+ ) : (
+ navigate("/")}
+ className={`${classLink} dark:text-white dark:hover:text-indigo-300`}
+ >
+ Already have an account?
+
)}
+
{location.pathname !== "/legal-mention" && (
- navigate("/legal-mention")}>
+ navigate("/legal-mention")}
+ className={`${classLink} inline-block dark:text-white dark:hover:text-indigo-300`}
+ >
Legal Mention
)}
diff --git a/tailwind.config.js b/tailwind.config.js
index f0d4f9d8..1ad65eda 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -6,8 +6,12 @@ export default {
"node_modules/preline/dist/*.js"
],
theme: {
- prefix: 'hs-', // Custom prefix for all Tailwind classes
+ prefix: 'hs-',
extend: {
+
+ zIndex: {
+ 'dropdown': '1000',
+ },
fontSize: {
'10': '10px',
},
@@ -81,6 +85,7 @@ export default {
},
},
},
+ darkMode: 'selector',
plugins: [
require('@tailwindcss/forms'),
require('tailwind-scrollbar'),