mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-06-16 05:44:17 -06:00
feat(InterviewBookingForm): Mostly done
This commit is contained in:
parent
1dc41aca81
commit
9a139619e3
@ -1,3 +1,5 @@
|
|||||||
|
import InterviewForm from "./InterviewForm";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {null} null - requires onthing
|
* @param {null} null - requires onthing
|
||||||
* @returns {JSX.Element} Page - HTML tags and JS functionality
|
* @returns {JSX.Element} Page - HTML tags and JS functionality
|
||||||
@ -5,8 +7,12 @@
|
|||||||
* @author Brock <darkicewolf50@gmail.com>
|
* @author Brock <darkicewolf50@gmail.com>
|
||||||
* @todo add who helped developed the site and finalize css
|
* @todo add who helped developed the site and finalize css
|
||||||
*/
|
*/
|
||||||
const interviewBooking = () => {
|
const InterviewBooking = () => {
|
||||||
return <p>Hello</p>;
|
return (
|
||||||
|
<>
|
||||||
|
<InterviewForm />
|
||||||
|
</>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default interviewBooking;
|
export default InterviewBooking;
|
34
src/Interivew Booking/InterviewForm.jsx
Normal file
34
src/Interivew Booking/InterviewForm.jsx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
const InterviewForm = () => {
|
||||||
|
const [isButtonDisabled, setIsButtonDisabled] = useState(false);
|
||||||
|
const formsubmit = async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
setIsButtonDisabled(true);
|
||||||
|
await new Promise((res) => setTimeout(res, 10000));
|
||||||
|
const formData = new FormData(event.target);
|
||||||
|
const formObject = Object.fromEntries(formData.entries());
|
||||||
|
await console.log("Form Data:", formObject);
|
||||||
|
setIsButtonDisabled(false);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<form onSubmit={formsubmit}>
|
||||||
|
<label for="name">Name (What to call you):</label>
|
||||||
|
<input type="text" id="fname" name="name" placeholder="Jaeinceins" />
|
||||||
|
<label for="email">UCalgary Email:</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="email"
|
||||||
|
name="email"
|
||||||
|
placeholder="jaeinceins.bhaja@ucalgary.ca"
|
||||||
|
/>
|
||||||
|
<button type="submit" disabled={isButtonDisabled}>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default InterviewForm;
|
@ -1,6 +0,0 @@
|
|||||||
const interviewBooking = () => {
|
|
||||||
return (<>
|
|
||||||
</>);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default interviewBooking;
|
|
31
src/index.js
31
src/index.js
@ -9,7 +9,7 @@ import OurSponsors from "./OurSponsors/OurSponsors";
|
|||||||
import JoinTheClub from "./Club Membership & Upcoming Events/JoinTheClub/JoinTheClub";
|
import JoinTheClub from "./Club Membership & Upcoming Events/JoinTheClub/JoinTheClub";
|
||||||
import UpcomingEvents from "./Club Membership & Upcoming Events/UpcominEvents/UpcomingEvents";
|
import UpcomingEvents from "./Club Membership & Upcoming Events/UpcominEvents/UpcomingEvents";
|
||||||
import Gallery from "./Gallery/Gallery";
|
import Gallery from "./Gallery/Gallery";
|
||||||
import interviewBooking from "./Interivew Booking/InterviewBooking";
|
import InterviewBooking from "./Interivew Booking/InterviewBooking";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(document.getElementById("root"));
|
const root = ReactDOM.createRoot(document.getElementById("root"));
|
||||||
@ -18,28 +18,13 @@ root.render(
|
|||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route element={<Header />}>
|
<Route element={<Header />}>
|
||||||
<Route
|
<Route path="/" element={<AboutUs />}></Route>
|
||||||
path="/"
|
<Route path="/Teams" element={<SubTeams />}></Route>
|
||||||
element={<AboutUs />}></Route>
|
<Route path="/OurSponsors" element={<OurSponsors />}></Route>
|
||||||
<Route
|
<Route path="/JoinTheClub" element={<JoinTheClub />}></Route>
|
||||||
path="/Teams"
|
<Route path="/UpcomingEvents" element={<UpcomingEvents />}></Route>
|
||||||
element={<SubTeams />}></Route>
|
<Route path="/Gallery" element={<Gallery />}></Route>
|
||||||
<Route
|
<Route path="/InterviewBooking" element={<InterviewBooking />} />
|
||||||
path="/OurSponsors"
|
|
||||||
element={<OurSponsors />}></Route>
|
|
||||||
<Route
|
|
||||||
path="/JoinTheClub"
|
|
||||||
element={<JoinTheClub />}></Route>
|
|
||||||
<Route
|
|
||||||
path="/UpcomingEvents"
|
|
||||||
element={<UpcomingEvents />}></Route>
|
|
||||||
<Route
|
|
||||||
path="/Gallery"
|
|
||||||
element={<Gallery />}></Route>
|
|
||||||
<Route
|
|
||||||
path="/InterviewBooking"
|
|
||||||
element={<interviewBooking />}
|
|
||||||
/>
|
|
||||||
</Route>
|
</Route>
|
||||||
</Routes>
|
</Routes>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user