Skip to content

Commit

Permalink
Merge pull request #169 from pani2004/issue#159
Browse files Browse the repository at this point in the history
Added the contact us page
  • Loading branch information
Trisha-tech authored Jun 15, 2024
2 parents 24fc87c + 1a6ca5b commit 494a15c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Wishlist from './Pages/Wishlist.jsx';
import HomePage from './Pages/Home.jsx';
import Shop from "./Pages/Shop.jsx";
import { Toast } from "./Toast/Toast.js";

import Contact from "./Pages/Contact.jsx";
import { BrowserRouter as Router, Routes, Route} from 'react-router-dom';
import './Animations.css';

Expand All @@ -33,6 +33,7 @@ function App() {
<Route path="/wishlist" element={<Wishlist/>} />
<Route path="/cart" element={<Cart/>} />
<Route path="/orders" element={<Orders/>} />
<Route path="/contactus" element={<Contact/>}/>
</Routes>
<Toast position="bottom-right"/>
<Footer/>
Expand Down
2 changes: 1 addition & 1 deletion client/src/Components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Footer() {
<div className="footer-section">
<h2 className="text-lg font-bold mb-4">ABOUT</h2>
<ul className="footer-list">
<li><Link to="/" className="hover:text-yellow-300 text-lg">Contact us</Link></li>
<li><Link to="/contactus" className="hover:text-yellow-300 text-lg">Contact us</Link></li>
<li><Link to="/" className="hover:text-yellow-300 text-lg">About us</Link></li>
<li><Link to="/" className="hover:text-yellow-300 text-lg">Careers</Link></li>
<li><Link to="/" className="hover:text-yellow-300 text-lg">Gift Cards</Link></li>
Expand Down
37 changes: 37 additions & 0 deletions client/src/Pages/Contact.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { useEffect } from 'react';
function Contact() {
useEffect(()=>{
window.scrollTo(0,0)
})
return (

<div className="w-96 max-w-5xl p-5 bg-slate-900 shadow-md rounded-lg mx-auto my-10">
<h1 className="text-center text-white text-4xl mb-10">Contact Us</h1>
<div className="flex flex-col items-center gap-5">
<div className="w-full max-w-2xl p-5 bg-gray-800 text-white rounded-lg">
<form className="flex flex-col gap-4">
<div className="flex flex-col">
<label htmlFor="name" className="font-bold mb-1 text-white">Name:</label>
<input type="text" id="name" name="name" className="w-full p-2 border border-gray-400 rounded-md text-gray-900" required />
</div>
<div className="flex flex-col">
<label htmlFor="email" className="font-bold mb-1 text-white">Email:</label>
<input type="email" id="email" name="email" className="w-full p-2 border border-gray-400 rounded-md text-gray-900" required />
</div>
<div className="flex flex-col">
<label htmlFor="message" className="font-bold mb-1 text-white">Message:</label>
<textarea id="message" name="message" rows="5" className="w-full p-2 border border-gray-400 rounded-md text-gray-900" required></textarea>
</div>
<div className="flex justify-center">
<button type="submit" className="p-2 bg-blue-600 text-white rounded-md self-start hover:bg-blue-700">Submit</button>
</div>
</form>
</div>
</div>
</div>
);
}

export default Contact;

0 comments on commit 494a15c

Please sign in to comment.