Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contact page notification #2064

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
*{
cursor:none;
* {
cursor: none;
}

.sidebar-content {
padding: 10px;
cursor: none;
transition: background-color 0.2s;
}
padding: 10px;
cursor: none;
transition: background-color 0.2s;
}

.Toastify__toast-container {
color: #000;
}

.Toastify__toast {
font-size: 18px;
color: black;
background-color: rgb(165, 57, 197);
}
43 changes: 38 additions & 5 deletions frontend/src/Component/Contact.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React, { useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faLinkedin,
faFacebook,
faGithub,
faLinkedin,
faTwitter,
faFacebook,
} from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Lottie from "lottie-react";
import React, { useState } from "react";
import { Bounce, ToastContainer, toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import animationData from "../lottie/contact.json";
import "../style/Contact.css";

Expand All @@ -22,6 +24,24 @@ const Contact = () => {
setIsValid(emailRegex.test(value));
};

const handleSubmit = (event) => {
event.preventDefault();
if (isValid && email) {
toast("✅ Sent Successfully!", {
position: "top-center",
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: false,
draggable: true,
progress: undefined,
theme: "light",
transition: Bounce,
closeButton: true,
});
}
};

return (
<div className="outer-contact">
<div className="contact-container">
Expand All @@ -38,7 +58,7 @@ const Contact = () => {
<p className="contact-description">
Please fill out the form below to get in touch with us.
</p>
<form className="contact-form">
<form className="contact-form" onSubmit={handleSubmit}>
<div className="form-group">
<label htmlFor="name" className="form-label">
Name
Expand Down Expand Up @@ -122,6 +142,19 @@ const Contact = () => {
</div>
</div>
</div>
<ToastContainer
position="top-center"
autoClose={5000}
hideProgressBar={false}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover={false}
theme="light"
transition={Bounce}
/>
</div>
);
};
Expand Down
Loading