);
diff --git a/src/pages/LetterToMe/LetterToMe.css b/src/pages/LetterToMe/LetterToMe.css
new file mode 100644
index 00000000..90874e04
--- /dev/null
+++ b/src/pages/LetterToMe/LetterToMe.css
@@ -0,0 +1,129 @@
+
+
+.letter-to-me-container {
+ display: flex;
+ height: 95vh; /* Full viewport height */
+ width: 100%;
+}
+
+.left-column {
+ position: relative;
+ width:48%;
+ background-image: url('../../images/iitkgp.jpg');
+ background-color: black;
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+.overlay{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.6);
+}
+.content{
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 20px;
+ color:#f7f9f8;
+}
+
+.left-column h2 {
+ position: relative;
+ margin-top: 16px;
+ font-size: 2.7rem;
+ font-weight: 900;
+ margin-bottom: 28px;
+ text-align: center;
+
+}
+ .left-column h2 img{
+ position: absolute;
+ top:-40px;
+ left:-60px;
+ width: 100px;
+ height: 80px;
+ transform: rotate(340deg);
+
+ }
+
+.left-column p {
+ font-size: 1.1rem;
+ margin: 10px 0;
+ line-height: 1.5;
+}
+
+
+
+.right-column {
+ width: 52%;
+ background-color:#1c272b;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+form {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ gap: 20px;
+ justify-content: center;
+ align-items: center;
+ padding:0 60px;
+ /* max-width: 400px; */
+}
+
+
+
+form input, form textarea, form button {
+ background-color: white;
+ width: 100%;
+ padding: 12px;
+ border: 1px solid white;
+ border-radius: 4px;
+ font-size: 1rem;
+}
+.box1{
+ width:100%;
+ display: flex;
+ gap:16px;
+ align-items: center;
+}
+#sendDate, #rollNo{
+ width: 60%;
+}
+#message{
+ height:220px;
+}
+form button {
+ background-color: #ff9800;
+ color: #fff;
+ font-weight: bold;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+form button:hover {
+ background-color: #e68900;
+}
+
+.error-message {
+ color: #ff4d4d;
+ font-size: 0.9rem;
+}
+
+.server-message {
+ color: #4caf50;
+ font-size: 0.9rem;
+}
diff --git a/src/pages/LetterToMe/LetterToMe.js b/src/pages/LetterToMe/LetterToMe.js
new file mode 100644
index 00000000..6ef2d5a2
--- /dev/null
+++ b/src/pages/LetterToMe/LetterToMe.js
@@ -0,0 +1,220 @@
+import React, { useState, useCallback } from "react";
+import "./LetterToMe.css";
+import Layout from "../../components/Layouts/Layout";
+
+function debounce(func, delay) {
+ let timer;
+ return (...args) => {
+ clearTimeout(timer);
+ timer = setTimeout(() => func(...args), delay);
+ };
+}
+
+const Form = () => {
+ const api = "https://gymkhana.iitkgp.ac.in";
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ otp: "",
+ message: "",
+ rollNo: "",
+ sendDate: "",
+ });
+ const [isOtpSent, setIsOtpSent] = useState(false);
+ const [isLoading, setIsLoading] = useState(false);
+ const [emailError, setEmailError] = useState("");
+ const [serverMessage, setServerMessage] = useState("");
+
+ const isEmailValid = formData.email.endsWith("@kgpian.iitkgp.ac.in");
+
+ const handleChange = (e) => {
+ const { name, value } = e.target;
+
+ if (name === "email") {
+ setEmailError(
+ value.endsWith("@kgpian.iitkgp.ac.in")
+ ? ""
+ : "Please use your institute email."
+ );
+ }
+
+ setFormData({ ...formData, [name]: value });
+ };
+
+ const sendOtp = useCallback(
+ debounce(async () => {
+ if (!isEmailValid) return;
+ setIsLoading(true);
+ try {
+ const response = await fetch(`${api}/api/letter/sentOtp`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ email: formData.email }),
+ });
+ const data = await response.json();
+ if (response.ok) {
+ setIsOtpSent(true);
+ setServerMessage(data.message);
+ } else {
+ setServerMessage(data.message);
+ }
+ } catch (error) {
+ console.error("Error sending OTP:", error);
+ setServerMessage("Failed to send OTP. Please try again.");
+ } finally {
+ setIsLoading(false);
+ }
+ }, 2000),
+ [formData.email]
+ );
+
+ const verifyOtp = async () => {
+ if (!formData.otp) {
+ setServerMessage("Please enter the OTP.");
+ return;
+ }
+
+ setIsLoading(true);
+ try {
+ const response = await fetch(`${api}/api/letter/verifyOtp`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(formData),
+ });
+ const data = await response.json();
+ if (response.ok) {
+ setServerMessage(data.message);
+ setFormData({
+ name: "",
+ email: "",
+ otp: "",
+ message: "",
+ rollNo: "",
+ sendDate: "",
+ });
+ setIsOtpSent(false);
+ } else {
+ setServerMessage(data.message);
+ }
+ } catch (error) {
+ console.error("Error verifying OTP:", error);
+ setServerMessage("Failed to verify OTP. Please try again.");
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ A Letter To The Passing
Out You!
+
+
+ To all the bright-eyed futurists of today, the Editorship presents
+ this unique opportunity to write a heartfelt 'encrypted and totally
+ secure' letter to your future self, one that will be delivered to
+ you on your graduation day.
So, why wait? Immerse yourself in a
+ reflective thought and let your words weave the bridge between the
+ person you are today and the graduate you will become.
Share your
+ dreams, your aspirations, and the spark you wish your journey to be
+ fueled with. Picture the glitter in your eyes and wonder if you
+ achieved them. This is your chance to have a candid conversation
+ with your future self—only to be read by you and no one else. All
+ the entries are safe and unaccessed by any second person, so feel
+ free to pen down whatever you have in your heart.
+
+
+
+
+
+
+ {serverMessage &&
{serverMessage}
}
+
+
+
+ );
+};
+
+export default Form;
diff --git a/src/pages/Results/RenderResults.js b/src/pages/Results/RenderResults.js
index 9629132d..ca8ac6f8 100644
--- a/src/pages/Results/RenderResults.js
+++ b/src/pages/Results/RenderResults.js
@@ -4,6 +4,8 @@ import GC from "./data/GCdata";
import InterIITdata from "./data/InterIITdata";
const years = [
+ "2024-25",
+ "2023-24",
"2022-23",
"2021-22",
"2020-21",
diff --git a/src/pages/Results/data/GCdata.js b/src/pages/Results/data/GCdata.js
index 76f6e987..3ccd70de 100644
--- a/src/pages/Results/data/GCdata.js
+++ b/src/pages/Results/data/GCdata.js
@@ -1619,7 +1619,221 @@ const GCdata = {
Bronze: "SN/IG",
},
]
+ },
+ "2023-24": {
+ Sports: {
+ Male: [
+ {
+ Sport: "Overall",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ }
+ ],
+ Female: [
+ {
+ Sport: "Overall",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ }
+ ]
+ },
+ Technology: [],
+ Socult: [
+ {
+ Event: "Overall",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ },
+ {
+ Event: "Hindi Elocution",
+ Gold: "MMM",
+ Silver: "LBS",
+ Bronze: "LLR"
+ },
+ {
+ Event: "English Elocution",
+ Gold: "LLR",
+ Silver: "SN/IG",
+ Bronze: "MT"
+ },
+ {
+ Event: "Sketching",
+ Gold: "RP",
+ Silver: "Nehru",
+ Bronze: "Azad"
+ },
+ {
+ Event: "Groups",
+ Gold: "Nehru",
+ Silver: "MMM",
+ Bronze: ""
+ },
+ {
+ Event: "Western Instrumentals",
+ Gold: "Nehru",
+ Silver: "MT",
+ Bronze: "RK"
+ },
+ {
+ Event: "Western Vocals",
+ Gold: "SN/IG",
+ Silver: "Nehru",
+ Bronze: "MMM"
+ },
+ {
+ Event: "Eastern Vocals",
+ Gold: "MMM",
+ Silver: "RP",
+ Bronze: "RK"
+ },
+ {
+ Event: "Eastern Instrumentals",
+ Gold: "Nehru",
+ Silver: "RK",
+ Bronze: "Azad"
+ },
+ {
+ Event: "General Quiz",
+ Gold: "RP",
+ Silver: "Nehru",
+ Bronze: "VS"
+ },
+ {
+ Event: "Debate",
+ Gold: "MT",
+ Silver: "RK",
+ Bronze: "Azad"
+ },
+ {
+ Event: "What's the Good Word",
+ Gold: "Nehru",
+ Silver: "RK",
+ Bronze: "Patel"
+ },
+ {
+ Event: "Painting",
+ Gold: "SNVH",
+ Silver: "MMM",
+ Bronze: "JCB"
+ },
+ {
+ Event: "Thermocol and Clay Modelling",
+ Gold: "Nehru",
+ Silver: "RK",
+ Bronze: "Patel"
+ },
+ {
+ Event: "Cartooning",
+ Gold: "Nehru",
+ Silver: "Azad",
+ Bronze: "SN/IG"
+ },
+ {
+ Event: "Short Film Making",
+ Gold: "",
+ Silver: "MS",
+ Bronze: "LBS"
+ },
+ {
+ Event: "Stage Play",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ },
+ {
+ Event: "Street Play",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ },
+ {
+ Event: "Choreography",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ }
+ ]
+ },
+ "2024-25": {
+ Sports: {
+ Male: [
+ {
+ Sport: "Overall",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ }
+ ],
+ Female: [
+ {
+ Sport: "Overall",
+ Gold: "",
+ Silver: "",
+ Bronze: ""
+ }
+ ]
+ },
+ Technology: [],
+ Socult: [
+ {
+ Event: "Overall",
+ Gold: "SN/IG",
+ Silver: "Azad",
+ Bronze: "MMM"
+ },
+ {
+ Event: "Cartooning",
+ Gold: "Azad",
+ Silver: "SN/IG",
+ Bronze: "SNVH"
+ },
+ {
+ Event: "English Elocution",
+ Gold: "RP",
+ Silver: "SN/IG",
+ Bronze: "MMM"
+ },
+ {
+ Event: "Sketching",
+ Gold: "RP",
+ Silver: "Azad",
+ Bronze: "Nehru"
+ },
+ {
+ Event: "Eastern Instrumentals",
+ Gold: "LBS",
+ Silver: "Nehru",
+ Bronze: "MS"
+ },
+ {
+ Event: "Street Play",
+ Gold: "MMM",
+ Silver: "Patel",
+ Bronze: "RK"
+ },
+ {
+ Event: "Eastern vocals",
+ Gold: "SN/IG",
+ Silver: "Nehru",
+ Bronze: "BRH"
+ },
+ {
+ Event: "Painting",
+ Gold: "Azad",
+ Silver: "SN/IG",
+ Bronze: "JCB"
+ },
+ {
+ Event: "Western Instrumentals",
+ Gold: "VS",
+ Silver: "JCB",
+ Bronze: "RK"
+ }
+ ]
}
};
-export default GCdata;
\ No newline at end of file
+export default GCdata;
diff --git a/src/pages/Results/data/InterIITdata.js b/src/pages/Results/data/InterIITdata.js
index 1c31b0d2..b8d820a2 100644
--- a/src/pages/Results/data/InterIITdata.js
+++ b/src/pages/Results/data/InterIITdata.js
@@ -1,9 +1,9 @@
const InterIITdata = {
"2016-17": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "Overall",
Gold: "Kanpur",
@@ -84,7 +84,7 @@ const InterIITdata = {
}
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "Overall",
Gold: "Madras , Bombay",
@@ -134,7 +134,7 @@ const InterIITdata = {
Bronze: "Kanpur",
}
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -189,10 +189,10 @@ const InterIITdata = {
]
},
"2017-18": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "Overall",
Gold: "Bombay",
@@ -279,7 +279,7 @@ const InterIITdata = {
}
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "Overall",
Gold: "Madras , Bombay",
@@ -329,7 +329,7 @@ const InterIITdata = {
Bronze: "Kanpur",
}
]
- },
+ },
Technology: [
{
Event: "Final Standings",
@@ -600,10 +600,10 @@ const InterIITdata = {
]
},
"2018-19": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "Overall",
Gold: " ",
@@ -684,7 +684,7 @@ const InterIITdata = {
}
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "Overall",
Gold: " ",
@@ -734,7 +734,7 @@ const InterIITdata = {
Bronze: " ",
}
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -744,14 +744,14 @@ const InterIITdata = {
},
],
Socult: [
-
+
]
},
"2019-20": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "Overall",
Gold: "Kharagpur",
@@ -838,7 +838,7 @@ const InterIITdata = {
}
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "Overall",
Gold: "Madras",
@@ -888,7 +888,7 @@ const InterIITdata = {
Bronze: "Madras",
}
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -1021,10 +1021,10 @@ const InterIITdata = {
]
},
"2020-21": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "EVENTS CANCELLED DUE TO COVID-19",
Gold: " ",
@@ -1033,7 +1033,7 @@ const InterIITdata = {
},
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "EVENTS CANCELLED DUE TO COVID-19",
Gold: " ",
@@ -1041,7 +1041,7 @@ const InterIITdata = {
Bronze: " ",
},
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -1051,14 +1051,14 @@ const InterIITdata = {
}
],
Socult: [
-
+
]
},
"2021-22": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: "EVENTS CANCELLED DUE TO COVID-19",
Gold: " ",
@@ -1067,7 +1067,7 @@ const InterIITdata = {
},
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: "EVENTS CANCELLED DUE TO COVID-19",
Gold: " ",
@@ -1075,7 +1075,7 @@ const InterIITdata = {
Bronze: " ",
},
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -1094,10 +1094,10 @@ const InterIITdata = {
]
},
"2022-23": {
- Sports:
+ Sports:
{
// MALE STANDINGS
- Male:[
+ Male: [
{
Sport: " ",
Gold: " ",
@@ -1106,7 +1106,7 @@ const InterIITdata = {
},
],
// FEMALE STANDINGS
- Female:[
+ Female: [
{
Sport: " ",
Gold: " ",
@@ -1114,7 +1114,7 @@ const InterIITdata = {
Bronze: " ",
},
]
- },
+ },
Technology: [
{
Event: "Overall",
@@ -1179,7 +1179,89 @@ const InterIITdata = {
Bronze: "Kharagpur",
}
]
+ },
+ "2023-24": {
+ Sports: {
+ Male: [],
+ Female: []
+ },
+ Technology: [],
+ Socult: [
+ {
+ Event: "Overall",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT Bombay",
+ Bronze: "IIT Roorkee"
+ },
+ {
+ Event: "Quiz",
+ Gold: "IIT Madras",
+ Silver: "IIT Kharagpur",
+ Bronze: "IIT Bombay"
+ },
+ {
+ Event: "Literary Arts",
+ Gold: "IIT Bombay",
+ Silver: "IIT Kharagpur",
+ Bronze: "IIT Madras"
+ },
+ {
+ Event: "Speaking and Comedic Arts",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT Kanpur",
+ Bronze: "IIT Roorkee"
+ },
+ {
+ Event: "Dance Arts",
+ Gold: "IIT Bombay",
+ Silver: "IIT Guwahati",
+ Bronze: "IIT Dhanbad"
+ },
+ {
+ Event: "Musical Arts",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT Kanpur",
+ Bronze: "IIT Bombay"
+ },
+ {
+ Event: "Theatre Arts",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT Bombay",
+ Bronze: "IIT Guwahati"
+ },
+ {
+ Event: "Filmmaking",
+ Gold: "IIT Bombay",
+ Silver: "IIT Kharagpur",
+ Bronze: "IIT Guwahati"
+ },
+ {
+ Event: "Fine Arts",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT BHU",
+ Bronze: "IIT Delhi"
+ },
+ {
+ Event: "Digital Arts",
+ Gold: "IIT Kharagpur",
+ Silver: "IIT BHU",
+ Bronze: "IIT Patna"
+ },
+ {
+ Event: "Fashion",
+ Gold: "IIT Roorkee",
+ Silver: "IIT Kharagpur",
+ Bronze: "IIT Bombay"
+ },
+ {
+ Event: "Culinary Arts",
+ Gold: "IIT Bombay",
+ Silver: "IIT Guwahati",
+ Bronze: "IIT Mandi"
+ }
+ ]
}
+
};
export default InterIITdata;
\ No newline at end of file