From 6ebe0989a6dd22758492a028537f922a3edca861 Mon Sep 17 00:00:00 2001 From: Md-Rubel-Ahmed-Rana Date: Tue, 9 Jul 2024 00:22:52 +0600 Subject: [PATCH] Contact section and login, register and some others design issue solved --- .../LandingPage/contact/ContactSection.tsx | 4 +-- .../src/components/pages/Signup/Signup.tsx | 28 ++----------------- frontend/src/components/pages/login/Login.tsx | 2 +- frontend/src/components/shared/Footer.tsx | 4 +-- frontend/src/components/shared/Navbar.tsx | 17 +++++------ 5 files changed, 16 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/pages/LandingPage/contact/ContactSection.tsx b/frontend/src/components/pages/LandingPage/contact/ContactSection.tsx index b6e17ba..6557346 100644 --- a/frontend/src/components/pages/LandingPage/contact/ContactSection.tsx +++ b/frontend/src/components/pages/LandingPage/contact/ContactSection.tsx @@ -41,7 +41,7 @@ const ContactSection = () => { }; return ( -
+

Contact Us

Have questions or need assistance? Reach out to our team for support. @@ -89,7 +89,7 @@ const ContactSection = () => { diff --git a/frontend/src/components/pages/Signup/Signup.tsx b/frontend/src/components/pages/Signup/Signup.tsx index 61e1129..7dc8c3f 100644 --- a/frontend/src/components/pages/Signup/Signup.tsx +++ b/frontend/src/components/pages/Signup/Signup.tsx @@ -5,7 +5,6 @@ import { IoMdEye, IoMdEyeOff } from "react-icons/io"; import { useRouter } from "next/router"; import { IUser } from "@/interfaces/user.interface"; import { useCreateUserMutation } from "@/features/user"; -import useUploadFile from "@/hooks/useUploadFile"; import GoogleLogin from "@/components/shared/GoogleLogin"; const Signup = () => { @@ -13,14 +12,12 @@ const Signup = () => { register, handleSubmit, formState: { errors }, - } = useForm(); + } = useForm({ mode: "onChange" }); const router = useRouter(); const [createUser] = useCreateUserMutation(); - const [profilePicture, setProfilePicture] = useState(""); const [togglePassword, setTogglePassword] = useState(false); const handleRegister: SubmitHandler = async (data) => { - data.profile_picture = profilePicture; const result: any = await createUser(data); if (result?.data?.success) { if (result?.data?.success) { @@ -44,19 +41,11 @@ const Signup = () => { } }; - const uploadFile = useUploadFile(); - - const handleFileChange = async (e: any) => { - const selectedFile = e.target.files[0]; - const uploadedFile: any = await uploadFile(selectedFile); - setProfilePicture(uploadedFile?.url); - }; - return (

@@ -138,19 +127,6 @@ const Signup = () => {

)}
-
- - -
{
diff --git a/frontend/src/components/shared/Footer.tsx b/frontend/src/components/shared/Footer.tsx index 9624abf..c56adf4 100644 --- a/frontend/src/components/shared/Footer.tsx +++ b/frontend/src/components/shared/Footer.tsx @@ -23,8 +23,8 @@ const socialIcons = [ const Footer = () => { return ( -