mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-06-15 13:24:17 -06:00
added comments to map section
This commit is contained in:
parent
09fd161ba2
commit
23f9511990
@ -9,7 +9,7 @@ import OpenPage from "../Header/OpenPage";
|
|||||||
* @returns {JSX.Element} JSX - HTML tags and JS functionality
|
* @returns {JSX.Element} JSX - HTML tags and JS functionality
|
||||||
* @description Our Sponsors Page
|
* @description Our Sponsors Page
|
||||||
* @author Brock <darkicewolf50@gmail.com>
|
* @author Brock <darkicewolf50@gmail.com>
|
||||||
* @todo add link to become a sponsor at top, and thank you message
|
* @todo finish page layout
|
||||||
*/
|
*/
|
||||||
const OurSponsors = () => {
|
const OurSponsors = () => {
|
||||||
const [sponsorsDict, setSponsorsDict] = useState(); //variable states for the dictionary of sponsors
|
const [sponsorsDict, setSponsorsDict] = useState(); //variable states for the dictionary of sponsors
|
||||||
@ -54,11 +54,13 @@ const OurSponsors = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div id="CurrentSponosrs">
|
<div id="CurrentSponosrs">
|
||||||
<h3>Current Sponsors</h3>
|
<h3>Current Sponsors</h3>
|
||||||
|
{/* gets the outmost name of the Object {"Name of tier": {...}} */}
|
||||||
{Object.keys(sponsorsDict).map((sponsorTier) => (
|
{Object.keys(sponsorsDict).map((sponsorTier) => (
|
||||||
<div
|
<div
|
||||||
key={sponsorTier}
|
key={sponsorTier}
|
||||||
className={sponsorTier}>
|
className={sponsorTier}>
|
||||||
<h2>{sponsorTier}</h2>
|
<h2>{sponsorTier}</h2>
|
||||||
|
{/* gets the keys from the new inner object used so that no two html tags are the "same" */}
|
||||||
{Object.keys(sponsorsDict[sponsorTier]).map((sponsorKey) => {
|
{Object.keys(sponsorsDict[sponsorTier]).map((sponsorKey) => {
|
||||||
const sponsor = sponsorsDict[sponsorTier][sponsorKey];
|
const sponsor = sponsorsDict[sponsorTier][sponsorKey];
|
||||||
return (
|
return (
|
||||||
@ -81,6 +83,7 @@ const OurSponsors = () => {
|
|||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{/* puts this in the sponsor's section only if they are silver and above */}
|
||||||
{sponsor.DescriptionAboutSponsor !== undefined &&
|
{sponsor.DescriptionAboutSponsor !== undefined &&
|
||||||
sponsor.DecriptionOnHelp !== undefined &&
|
sponsor.DecriptionOnHelp !== undefined &&
|
||||||
(sponsorTier !== "Bronze Tier" ||
|
(sponsorTier !== "Bronze Tier" ||
|
||||||
@ -88,11 +91,13 @@ const OurSponsors = () => {
|
|||||||
<p>Another Element</p>
|
<p>Another Element</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{/* puts this in the sponsor's section only if they are silver and above */}
|
||||||
{sponsor.DescriptionAboutSponsor !== undefined &&
|
{sponsor.DescriptionAboutSponsor !== undefined &&
|
||||||
(sponsorTier !== "Bronze Tier" ||
|
(sponsorTier !== "Bronze Tier" ||
|
||||||
sponsorTier !== "Silver Tier") && (
|
sponsorTier !== "Silver Tier") && (
|
||||||
<p>{sponsor.DescriptionAboutSponsor}</p>
|
<p>{sponsor.DescriptionAboutSponsor}</p>
|
||||||
)}
|
)}
|
||||||
|
{/* puts this in the sponsor's section only if they are silver and above */}
|
||||||
{sponsor.DecriptionOnHelp !== undefined &&
|
{sponsor.DecriptionOnHelp !== undefined &&
|
||||||
(sponsorTier !== "Bronze Tier" ||
|
(sponsorTier !== "Bronze Tier" ||
|
||||||
sponsorTier !== "Silver Tier") && (
|
sponsorTier !== "Silver Tier") && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user