-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enhancement-gssoc
- Loading branch information
Showing
11 changed files
with
576 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React from "react"; | ||
import "../../styles/About.css"; | ||
import Footer from "./Footer"; | ||
import Header from "../Header/Header"; | ||
import Hero from "./Hero"; | ||
|
||
const About = () => { | ||
const socialMediaLinks = [ | ||
{ | ||
icon: "fa fa-facebook-f", | ||
link: "https://www.facebook.com/", // Replace with your Facebook link | ||
}, | ||
{ | ||
icon: "fa fa-instagram", | ||
link: "https://www.instagram.com/", // Replace with your Instagram link | ||
}, | ||
{ | ||
icon: "fa fa-twitter", | ||
link: "https://www.twitter.com/", // Replace with your Twitter link | ||
}, | ||
]; | ||
|
||
return ( | ||
<> | ||
<Header /> | ||
<section id="about-us"> | ||
<div className="container"> | ||
<div className="about_top"> | ||
<h2 className="section_title">About Us</h2> | ||
<p> | ||
We are passionate about helping people achieve their health and | ||
fitness goals. We believe that exercise is a | ||
powerful tool for transformation, not just physically but also | ||
mentally and emotionally. | ||
</p> | ||
</div> | ||
<div className="about_content"> | ||
<p> | ||
Our team consists of certified trainers who are not only | ||
knowledgeable but also genuinely care about your success. They are | ||
committed to providing personalized guidance, motivation, and | ||
encouragement to help you push your limits and achieve results you | ||
never thought possible. | ||
</p> | ||
<h3>Here's what sets us apart:</h3> | ||
<ul> | ||
<li> | ||
<b>A welcoming and inclusive atmosphere:</b> We believe in creating a | ||
space where everyone feels comfortable, regardless of their | ||
fitness background. | ||
</li> | ||
<li> | ||
<b>Variety and flexibility:</b> We offer a wide range of classes, | ||
programs, and equipment to cater to different needs and | ||
preferences. We understand that schedules can be busy, so we | ||
provide flexible options to fit your lifestyle. | ||
</li> | ||
<li> | ||
<b>Holistic approach to wellness:</b> We go beyond just physical | ||
training. We offer resources and guidance to help you integrate | ||
healthy habits into all aspects of your life. | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
<Footer/> | ||
</> | ||
); | ||
}; | ||
|
||
export default About; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import React, { useState } from "react"; | ||
import toast, { Toaster } from "react-hot-toast"; | ||
import "../../styles/register.css"; | ||
import Lottie from "lottie-react"; | ||
import ContactAnimation from "../../assets/JSON/contactus.json"; | ||
|
||
const Login = () => { | ||
const initialFormData = { | ||
email: "", | ||
password: "", | ||
}; | ||
const [formData, setFormData] = useState(initialFormData); | ||
|
||
const validateForm = () => { | ||
if (formData.email === "" || formData.email === null) { | ||
toast.error("Please enter your email"); | ||
return false; | ||
} else if (!isValidEmail(formData.email)) { | ||
toast.error("Please enter a valid email"); | ||
return false; | ||
} else if (formData.password === "" || formData.password === null) { | ||
toast.error("Please enter a password"); | ||
return false; | ||
} else if (!isValidPassword(formData.password)) { | ||
toast.error("Please enter a valid password"); | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
}; | ||
|
||
const isValidEmail = (email) => { | ||
const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; | ||
return emailPattern.test(email); | ||
}; | ||
|
||
const isValidPassword = (password) => { | ||
const passwordPattern = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/; | ||
return passwordPattern.test(password); | ||
}; | ||
|
||
const handleSubmit = (e) => { | ||
e.preventDefault(); | ||
if (validateForm()) { | ||
toast.success("Logged-in successfully", { | ||
duration: 3000, // Duration in milliseconds (3 seconds) | ||
position: "top-center", | ||
} | ||
); | ||
console.log("Form data:", formData); | ||
setFormData(initialFormData); | ||
} | ||
}; | ||
|
||
const handleInputChange = (e) => { | ||
const { name, value } = e.target; | ||
setFormData({ ...formData, [name]: value }); | ||
}; | ||
|
||
return ( | ||
<section id="contact-us" className="form"> | ||
<Toaster /> | ||
<div className="w-full form grid justify-center items-center"> | ||
<div className="register-img"> | ||
<img src="./image.png" width={500}></img> | ||
</div> | ||
<div className="contact-form-container"> | ||
<h1 className="heading text-center">Login</h1> | ||
<form onSubmit={handleSubmit} className="contact-form"> | ||
<div className="input-group"> | ||
<input | ||
type="email" | ||
placeholder="Email" | ||
name="email" | ||
value={formData.email} | ||
onChange={handleInputChange} | ||
/> | ||
</div> | ||
<div className="input-group"> | ||
<input | ||
type="password" | ||
placeholder="Password" | ||
name="password" | ||
value={formData.password} | ||
onChange={handleInputChange} | ||
/> | ||
</div> | ||
<div className="text-end"> | ||
<button className="submit" type="submit"> | ||
Login | ||
</button> | ||
</div> | ||
<div> | ||
<a href="/register">New user ? <span style={{fontWeight:900}}>Register Here.</span> </a> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Login; |
Oops, something went wrong.