From deba94be6c95214a99daf24685e44698e77c9ef2 Mon Sep 17 00:00:00 2001
From: Garima Chandra <143211271+Garima-149@users.noreply.github.com>
Date: Thu, 25 Jul 2024 21:43:16 +0530
Subject: [PATCH] Resolving issue Adding Contact us section #522 (#526)
---
src/App.jsx | 26 +++++
src/pages/user/Conatctus.jsx | 138 +++++++++++++++++++++++
src/pages/user/HomePage.jsx | 206 +++++++++++++++++++++--------------
src/pages/user/home.css | 33 ++++++
4 files changed, 323 insertions(+), 80 deletions(-)
create mode 100644 src/pages/user/Conatctus.jsx
create mode 100644 src/pages/user/home.css
diff --git a/src/App.jsx b/src/App.jsx
index 50b94051..4108d3da 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -24,8 +24,22 @@ import NgoProfile from './pages/ngo/ngoProfile';
import { Donationfront } from './pages/user/Donation/Donationfront/Donationfront';
import requestPermission from './utils/Functions/notifyService';
import TeamPage from './pages/shared/team';
+
+import NotFound from './Components/shared/PageNotfound';
+
+
+import ContactPage from './pages/user/Conatctus';
+
+
+import Preloader from './Components/shared/preloader/preloader';
+import Feedback from './pages/user/ReportIncidentPages/FeedbackForm/Feedback';
+
+import RecoveredsPage from './pages/user/RecoveredsPage/RecoveredsPage';
+import HappyRecoveriesPage from './pages/user/RecoveredsPage/HappyRecoveriesPage';
+
import NotFound from './Components/shared/PageNotfound'; // Import NotFound component
+
function App() {
useEffect(() => {
// Request user for notification permission
@@ -59,7 +73,19 @@ function App() {
} /> {/* Renders the NgoProfile component */}
} />
} />
+
+
+
+ } />
+
+ } />
+ } />
+
+
+
+
} /> {/* Renders the NotFound component for any unmatched route */}
+
diff --git a/src/pages/user/Conatctus.jsx b/src/pages/user/Conatctus.jsx
new file mode 100644
index 00000000..393d052e
--- /dev/null
+++ b/src/pages/user/Conatctus.jsx
@@ -0,0 +1,138 @@
+import { Link, useNavigate } from "react-router-dom";
+import { useEffect, useState } from "react";
+import { FaStar } from "react-icons/fa";
+import { PiPawPrintFill } from "react-icons/pi";
+import ReactiveButton from "reactive-button";
+import InputField from "../../Components/shared/InputField";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import {
+ faPhone,
+ faMapMarkerAlt,
+ faEnvelope,
+} from "@fortawesome/free-solid-svg-icons";
+import "./home.css";
+
+const customButtonStyle = {
+ borderRadius: "20px",
+ background: "linear-gradient(to bottom, #b3d9ff, #3399ff)",
+ padding: "20px 40px",
+ fontSize: "12px",
+ fontWeight: "800",
+ boxShadow: "rgb(38, 57, 77) 0px 15px 30px -10px",
+ letterSpacing: "0.1rem",
+ width: "fit-content",
+};
+const stars = Array.from({ length: 45 /*no of stars*/ }, (_, i) => (
+
+));
+
+function ContactPage() {
+ const [name, setName] = useState("");
+ const [message, setMessage] = useState("");
+ const [email, setEmail] = useState("");
+ const [phone, setPhone] = useState("");
+ const [state, setButtonState] = useState("idle");
+
+ const handleSubmit = (e) => {
+ e.preventDefault();
+ setName("");
+ setEmail("");
+ setPhone("");
+ setButtonState("submitted");
+ };
+
+ return (
+
+ );
+}
+export default ContactPage;
diff --git a/src/pages/user/HomePage.jsx b/src/pages/user/HomePage.jsx
index 06e42656..f88aa5ab 100644
--- a/src/pages/user/HomePage.jsx
+++ b/src/pages/user/HomePage.jsx
@@ -1,95 +1,141 @@
import { Link, useNavigate } from "react-router-dom";
-import { useEffect } from "react";
-import { FaStar } from 'react-icons/fa';
+import { useEffect, useState } from "react";
+import { FaStar } from "react-icons/fa";
import { PiPawPrintFill } from "react-icons/pi";
+import ReactiveButton from "reactive-button";
+import InputField from "../../Components/shared/InputField";
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faPhone, faMapMarkerAlt, faEnvelope } from '@fortawesome/free-solid-svg-icons';
+import './home.css';
+import './Conatctus';
const stars = Array.from({ length: 45 /*no of stars*/ }, (_, i) => (
-
+
));
+const customButtonStyle = {
+ borderRadius: "20px",
+ background: "linear-gradient(to bottom, #b3d9ff, #3399ff)",
+ padding: "20px 40px",
+ fontSize: "12px",
+ fontWeight: "800",
+ boxShadow: "rgb(38, 57, 77) 0px 15px 30px -10px",
+ letterSpacing: "0.1rem",
+ width: "fit-content",
+};
+
function LandingPage() {
- const navigate = useNavigate();
- const csrftoken = localStorage.getItem('csrftoken');
- const userType = localStorage.getItem('userType');
-
- useEffect(() => {
- const img = new Image();
- img.src = "./images/paws.webp";
- document.body.style.overflow = 'hidden';
- document.body.style.touchAction = 'manipulation';
-
- return () => {
- document.body.style.overflow = '';
- document.body.style.touchAction = '';
- };
- }, []);
-
- useEffect(() => {
- if (csrftoken && userType === "ngo") {
- navigate('/stats');
- }
- }, [csrftoken, userType, navigate]);
+ const [name, setName] = useState("");
+ const [message, setMessage] = useState("");
+ const [email, setEmail] = useState("");
+ const [phone, setPhone] = useState("");
+ const [state, setButtonState] = useState("idle");
+
+ const navigate = useNavigate();
+ const csrftoken = localStorage.getItem("csrftoken");
+ const userType = localStorage.getItem("userType");
+
+ useEffect(() => {
+ const img = new Image();
+ img.src = "./images/paws.webp";
+ document.body.style.overflow = "hidden";
+ document.body.style.touchAction = "manipulation";
+
+ return () => {
+ document.body.style.overflow = "";
+ document.body.style.touchAction = "";
+ };
+ }, []);
- return (
-
-
-
- {stars}
-
-
-
-
{
+ if (csrftoken && userType === "ngo") {
+ navigate("/stats");
+ }
+ }, [csrftoken, userType, navigate]);
- className="mx-auto my-auto h-72 backdrop-blur"
- src="./images/paws.webp"
- alt="Paws"
- />
-
Pause to save Paws
-
-
- "Save lives - Click below to report
-
-
- injured animals to authorities."
-
+ const handleSubmit = (e) => {
+ e.preventDefault();
+ setName("");
+ setEmail("");
+ setPhone("");
+ setButtonState("submitted");
+ };
+
+ return (
+
+
+
+ {stars}
+
+
+
+
+
+ Paws
+
+
- {/* BUTTON */}
-
+
+
+
+ Pause to save Paws
+
+
+
"Save lives - Click below to report
+
injured animals to authorities."
+
+ {/* BUTTON */}
+
-
-
-
-
+
+
+
+
+
+
-);}
+ );
+}
-export default LandingPage;
\ No newline at end of file
+export default LandingPage;
diff --git a/src/pages/user/home.css b/src/pages/user/home.css
new file mode 100644
index 00000000..20fa86ef
--- /dev/null
+++ b/src/pages/user/home.css
@@ -0,0 +1,33 @@
+
+
+ .input-with-icon {
+ padding-left: 30px; /* Adjust based on icon size and padding */
+ background-color: azure;
+ background-repeat: no-repeat;
+ background-position:left; /* Adjust as needed */
+ border-radius: 0.5rem;
+
+ }
+
+ .input-with-icon::placeholder {
+ color: #999;
+ }
+
+
+ .container {
+ background-color: rgb(4, 4, 83);
+ color: white;
+ padding: 20px;
+ margin-left: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ margin-right: 0px;
+ border-radius: 0px;
+ position: absolute;
+ top: 60px;
+ left: 64px;
+ width: 87rem;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+
+
+ }
\ No newline at end of file