-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dropdown Selector for Awards Section
- Loading branch information
Showing
10 changed files
with
189 additions
and
219 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
|
||
export const contactsDropdownList = [ | ||
"CURRENT OFFICE BEARERS", | ||
"STAFF", | ||
"PREVIOUS OFFICE BEARERS", | ||
]; | ||
]; | ||
|
||
export const awardsDropdownList = [ | ||
"SPORTS & GAMES", | ||
"TECHNOLOGY", | ||
"SOCIAL & CULTURAL", | ||
"SPECIAL RECOGNITION", | ||
]; |
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,37 @@ | ||
import awardsData from "./awardsData.json"; | ||
import ContactCard from "../../components/ContactCard"; | ||
|
||
export default function AwardSection({ currentYear, currentTab }) { | ||
return ( | ||
<> | ||
<h2 className="sectionHeading"> Awards </h2> | ||
<div className="cards" data-aos="zoom-in-up"> | ||
{currentTab !== "specialRecog" | ||
? awardsData[currentYear][currentTab]["awards"]?.map( | ||
(winner, index) => ( | ||
<ContactCard | ||
key={index} | ||
name={winner.Name} | ||
imgSrc={`data/media/images/awards/${winner.Image}`} | ||
designation={winner.Award} | ||
email={winner.email} | ||
facebook={winner.facebook} | ||
linkedin={winner.linkedin} | ||
/> | ||
) | ||
) | ||
: awardsData[currentYear][currentTab].map((winner, index) => ( | ||
<ContactCard | ||
key={index} | ||
name={winner.Name} | ||
imgSrc={`data/media/images/awards/${winner.Image}`} | ||
designation={winner.Award} | ||
email={winner.email} | ||
facebook={winner.facebook} | ||
linkedin={winner.linkedin} | ||
/> | ||
))} | ||
</div> | ||
</> | ||
); | ||
} |
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,33 @@ | ||
import awardsData from "./awardsData.json"; | ||
|
||
export default function HonourSection({ currentYear, currentTab }) { | ||
return ( | ||
<> | ||
<h2 className="sectionHeading"> Honours </h2> | ||
<div className="table-container" data-aos="zoom-in-up"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Roll No.</th> | ||
<th>Institute Award</th> | ||
{currentTab === "sports" && <th>Game</th>} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{awardsData[currentYear][currentTab]["honours"].map( | ||
(winner, index) => ( | ||
<tr key={index}> | ||
<td>{winner.Name}</td> | ||
<td>{winner.Roll} </td> | ||
<td>{winner.Award}</td> | ||
{currentTab === "sports" && <td>{winner.Game}</td>} | ||
</tr> | ||
) | ||
)} | ||
</tbody> | ||
</table> | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.