added navigate button to become a sponsor

This commit is contained in:
darkicewolf50 2023-12-09 14:03:03 -07:00
parent 992bf5017b
commit 6147999572

View File

@ -3,6 +3,7 @@ import { useState } from 'react';
import './OurSponsors.css'
//can be removed later
import fakeDelay from '../TestingTools/fakeDelay';
import { useNavigate } from 'react-router-dom';
/*
things to do
@ -25,6 +26,12 @@ const OurSponsors = () => {
getSponsors(); //get sponsors on startup of page
}, []);
const OpenPage = (arg) => {
const navigate = useNavigate();
navigate(arg);
console.log(arg);
};
const getSponsors = async () => {
/*
Gets the list of sponsors from the synology drive (not implemented), converts the json file into a dictionary
@ -126,6 +133,9 @@ const OurSponsors = () => {
}
if(sponsorsDict) { //maps out the dictionary and displays the content
return (<div id='OurSponsors'>
<div id='BecomeASponsors'>
<button onClick={() => OpenPage('/BecomeASponsor')}>Become A Sponsor</button>
</div>
{Object.keys(sponsorsDict).map((sponsorTier) => (
<div key={sponsorTier} className={sponsorTier}>
<h2>{sponsorTier}</h2>