Skip to content
Open
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
Binary file added public/data/media/files/Election 2025-26.pdf
Binary file not shown.
Binary file added public/data/media/files/Rules 2025-26.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/data/media/images/contacts/President.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function App() {
<Route exact path="/ContactUs" component={ContactUs} />

{/* Election Routes */}
{/* <Route exact path="/elections" component={Elections} />
<Route exact path="/elections/candidates" component={ElectionCandidates} /> */}
<Route exact path="/elections" component={Elections} />
{/* <Route exact path="/elections/candidates" component={ElectionCandidates} /> */}

{/* Nominations Route */}
{/* <Route exact path="/nominations" component={Nominations} /> */}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ export default function Navbar() {
</li>

{/* ELECTIONS */}
{/* <li className={Styles.navItem}>
<li className={Styles.navItem}>
<NavLink
to="/elections"
className={Styles.navLinks}
activeClassName={Styles.acitveLink}
>
Elections
</NavLink>
</li> */}
</li>

{/* NOMINATIONS */}
{/* <li className={Styles.navItem}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const Popup = (props) => {
<div className="popup-content text">
<div className='content-date'>{props.content.dates}</div> <br />
<div className='content-description'>{props.content.description}</div> <br />
<div className={showLink1}><span style={{ color: '#f1c40f' }}>Registration Link :</span> <a href={props.content.link1} target="_blank" rel='noreferrer'> Link </a></div>
<div className={showLink2}><span style={{ color: '#f1c40f' }}>Facebook Post Link :</span> <a href={props.content.link2} target="_blank" rel='noreferrer'> Link </a></div>
<div className={showLink3}><span style={{ color: '#f1c40f' }}>Rules and Regulations :</span> <a href={props.content.link3} target="_blank" rel='noreferrer'> Link </a></div>
<div className={showLink1}><span style={{ color: '#f1c40f' }}>Registration Link :</span> <a href={props.content.registrationLink} target="_blank" rel='noreferrer'> {props.content.registrationLink?props.content.registrationLink:"N/A"} </a></div>
<div className={showLink2}><span style={{ color: '#f1c40f' }}>Facebook Post Link :</span> <a href={props.content.fbPostLink} target="_blank" rel='noreferrer'> {props.content.fbPostLink?props.content.fbPostLink:"N/A"} </a></div>
<div className={showLink3}><span style={{ color: '#f1c40f' }}>Rules and Regulations :</span> <a href={props.content.rulesAndRegulationLink} target="_blank" rel='noreferrer'>{props.content.rulesAndRegulationLink?props.content.rulesAndRegulationLink:"N/A"}</a></div>
</div>
</div>
</div>
Expand Down
22 changes: 17 additions & 5 deletions src/data/contactsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ export default {
data: [
{
RollNo: "President",
Name: "Prof. Ajay Kumar Singh",
Name: "Prof. Jitendra Mahakud",
Post: "President",
img: "President.png",
Facebook: "https://www.facebook.com/100001621282748",
LinkedIn: "https://www.linkedin.com/in/ajay-kumar-singh-7ab680112/",
Facebook: "",
LinkedIn: "https://www.linkedin.com/in/jitendra-mahakud-26463b109/",
Contact: "",
Email: "[email protected]",
"Institue ids": "http://www.iitkgp.ac.in/department/PH/faculty/ph-singh",
Email: "[email protected]",
"Institue ids": "https://www.iitkgp.ac.in/department/PH/faculty/ph-singh",
"Institute mail ids": "",
},
{
RollNo: " Associate President",
Name: "Prof. Arijit De",
Post: "Associate President",
img: "AssociatePresident.jpg",
Facebook: "",
LinkedIn: "",
Contact: "",
Email: "[email protected]",
"Institue ids": "https://www.iitkgp.ac.in/department/EC/faculty/ec-arijit",
"Institute mail ids": "",
},
{
Expand Down
15 changes: 15 additions & 0 deletions src/pages/Contacts/CurrentOfficeBearers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default function CurrentOfficeBearers() {
const President = contactsData.data.find(
(contact) => contact.Post === "President"
);
const Associate_President = contactsData.data.find(
(contact) => contact.Post === "Associate President"
);
const HonoraryTreasurer = contactsData.data.find(
(contact) => contact.Post === "Honorary Treasurer"
);
Expand Down Expand Up @@ -58,6 +61,18 @@ export default function CurrentOfficeBearers() {
/>
</div>
</div>
<div>
<div data-aos="zoom-in-up">
<ContactCard
name={Associate_President.Name}
designation={Associate_President.Post}
facebook={Associate_President.Facebook}
linkedin={Associate_President.LinkedIn}
email={Associate_President.Email}
imgSrc={`/data/media/images/contacts/${Associate_President.img}`}
/>
</div>
</div>

<div>
<div data-aos="zoom-in-up">
Expand Down
24 changes: 12 additions & 12 deletions src/pages/Elections/Elections.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Elections() {
align="center"
>
{" "}
TSG Elections 2024-2025
TSG Elections 2025-2026
</Typography>
<Box className={Styles.electionBody}>
<Typography variant="body2">
Expand All @@ -35,7 +35,7 @@ export default function Elections() {
Election is as follows:
</Typography>
<Typography variant="body2">
<b>Date of Election:</b> 13th April 2024 (Saturday) <br />
<b>Date of Election:</b> 6th April 2025 (Saturday) <br />
<b>Time of Election:</b> 8:00 AM to 6:00 PM <br />
<b>Venue:</b> Computer & Informatics Center (CIC), Takshashila, IIT
Kharagpur <br />
Expand All @@ -48,7 +48,7 @@ export default function Elections() {
<Box className={Styles.electionBody}>
<Typography variant="h5">Notices:</Typography>
<Box className={Styles.notices}>
<Typography className={Styles.notice}>
{/* <Typography className={Styles.notice}>
<div className={Styles.noticeDescription}>
View Votes of Candidates
</div>
Expand Down Expand Up @@ -92,7 +92,7 @@ export default function Elections() {
View Schedule <LaunchIcon />
</a>
</Button>
</Typography>
</Typography> */}
{/* <Typography className={Styles.notice}>
<div className={Styles.noticeDescription}>
Final List of Candidates for TSG Election (2023-24)
Expand Down Expand Up @@ -120,7 +120,7 @@ export default function Elections() {
Complex, IIT Kharagpur
</div>
</Typography> */}
<Typography className={Styles.notice}>
{/* <Typography className={Styles.notice}>
<div className={Styles.noticeDescription}>
Proposals of Candidates
</div>
Expand All @@ -144,14 +144,14 @@ export default function Elections() {
View List &nbsp; <LaunchIcon />
</a>
</Button>
</Typography>
</Typography> */}
<Typography className={Styles.notice}>
<div className={Styles.noticeDescription}>
TSG Election (2024-2025) Notification
TSG Election (2025-2026) Notification
</div>
<Button>
<a
href="/data/media/files/revised_election_schedule_2024.pdf"
href="/data/media/files/Election 2025-26.pdf"
lat="notice"
target="_blank"
rel="noopener"
Expand All @@ -162,16 +162,16 @@ export default function Elections() {
</Typography>
<Typography className={Styles.notice}>
<div className={Styles.noticeDescription}>
Election Officer (2024 - 2025)
Election Officer (2025 - 2026)
</div>
<Button>
<a
href="mailto:probal@gg.iitkgp.ac.in"
href="mailto:samantaray@mech.iitkgp.ac.in"
lat="eo_mail"
target="_blank"
rel="noopener"
>
Prof. Probal Sengupta &nbsp; <LaunchIcon />
Prof. Arun Kumar Samantaray &nbsp; <LaunchIcon />
</a>
</Button>
</Typography>
Expand Down Expand Up @@ -232,7 +232,7 @@ export default function Elections() {
<Button>
{" "}
<a
href="/data/media/files/Rules_2024-25.pdf"
href="/data/media/files/Rules 2025-26.pdf"
alt="notification"
target="_blank"
>
Expand Down
90 changes: 16 additions & 74 deletions src/pages/Events/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,61 +20,28 @@ export default function Events() {
const [content, setContent] = useState(null);
const [title, setTitle] = useState(null);
const [eventResults, setEventResults] = useState(null);
// const [resContent, setResContent] = useState(null);
const [image, setImage] = useState(null);
const [index, setIndex] = useState(null);
const paginationNumber = 4;
const [eventIndex, setEventIndex] = useState({
startIndex: 1,
stopIndex: paginationNumber,
});
const [events, setEvents] = useState([]);
const [images,setImages] = useState([]);
const [btnStyles, setBtnStyles] = useState("btn-warning");
const [noMoreEvents, setNoMoreEvents] = useState(false);

// const [displayEvents] = useState(null);
const [loading, setLoading] = useState(true);

const handlePosterClick = (videoLink) => {
window.open(videoLink);
};
document.title = "Events | TSG";
// eslint-disable-next-line
// const highlightEvents = events.filter((event) => event.isHighlight);
//eslint-disable-next-line
// const [isHighlightOpen, setIsHighlightOpen] = useState(true);
//eslint-disable-next-line
useEffect(() => {
setTimeout(async () => {
fetch(
`${host}/events/`
)
.then((response) => response.json())
.then((responseData) => {
setEvents(events.concat(responseData.data));
if (responseData.data.length === 0) {
setNoMoreEvents(true);
}
console.log(responseData.data)
})
.catch((err) => {
console.log("the error is", err);
});
});
// eslint-disable-next-line react-hooks/exhaustive-deps
setLoading(true);
fetch(`${host}/events/`)
.then((response) => response.json())
.then((responseData) => {
setEvents(responseData.data);
setLoading(false);
})
.catch((err) => {
console.log("the error is", err);
setLoading(false);
});
}, []);



useEffect(() => {
if (noMoreEvents) {
setBtnStyles("btn-secondary");
}
}, [noMoreEvents]);

useEffect(() => {
setTimeout(async () => {});
});

return (
<Layout>
Expand Down Expand Up @@ -140,25 +107,15 @@ export default function Events() {
</section>
</section>



<div className={Styles.mainContainer}>
{(loading || events?.length) && <div className={Styles.mainContainer}>
{/* Upcoming Events Container */}

<div className={Styles.categoryContainer} data-aos="zoom-in-up">
<h2 className={Styles.categoryHeading2}>Events</h2>
<div className={Styles.cardsWrapper}>
{events &&
{!loading && events?.length &&
events.map((event, index) => {
// Earlier code had a problem with the URL so we hard coded it in line number 157
// let imgSrc = null;
// if (event.image) {
// imgSrc = `data:${event.image.imageMimeType};base64,${Buffer.from(
// event.image
// ).toString("base64")}`;
// }
let imgSrc = `https://gymkhana.iitkgp.ac.in${event.image}`;
console.log(imgSrc);
return (
<EventCard
key={event.id}
Expand All @@ -177,37 +134,22 @@ export default function Events() {
setShowRes(true);
setTitle(event.title);
setIndex(event.id);
// console.log(`The title is ${title} id = ${event.id}`);
}}
setEventResults={setEventResults}
/>
);
})}
{!events.length && (
{loading && (
<div>
<SkeletonElement type="thumbnail" />
<SkeletonElement type="thumbnail" />
<SkeletonElement type="thumbnail" />
<SkeletonElement type="thumbnail" />
</div>
)}

<button
style={{ width: "30%" }}
className={`m-auto btn ${btnStyles} text-white`}
disabled={noMoreEvents}
onClick={() => {
setEventIndex({
startIndex: eventIndex.startIndex + paginationNumber,
stopIndex: eventIndex.stopIndex + paginationNumber,
});
}}
>
See More Events
</button>
</div>
</div>
</div>
</div>}
</div>
</Layout>
);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Results/RenderResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading