Skip to content

Commit

Permalink
bump api schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Dec 3, 2024
1 parent b71f789 commit 2ce343b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions frontend/src/app/about/ExecProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface Executive {
async function getExecutives() {
const res = await fetch('https://api3.langaracs.ca/executives/all');
const executives = await res.json();
return executives;
return executives['executives'];
}

export default async function ExecProfiles() {
Expand Down Expand Up @@ -57,35 +57,35 @@ export default async function ExecProfiles() {
return (
<div className="flex flex-wrap flex-row gap-20 justify-center">
{/* Block for current executives grouped by year */}
{Object.keys(groupedCurrentExecutives).map(year => (
<div key={year} className="flex-row gap-5">

<div className="flex-row gap-5">
<h2 className="text-3xl pb-5">Current Executives:</h2>

<div className=" flex flex-wrap flex-row gap-5 justify-center">
{groupedCurrentExecutives[year].map((exec) => (
<ExecProfile {...exec}/>
{Object.values(groupedCurrentExecutives).flat().map((exec, index) => (
<ExecProfile key={index} {...exec} />
))}
</div>
</div>
))}

{/* Block for retired executives grouped by year */}
{sortedRetiredYears.map(year => (
<div key={year} className="mt-40">
<h2 className="text-2xl pb-5">Retired Executives - {year}:</h2>
<div className="flex flex-wrap flex-row gap-5 justify-center">
{groupedRetiredExecutives[year].map((exec) => (
<ExecProfile {...exec}/>
<ExecProfile {...exec} />
))}
</div>
</div>
))}
<br></br>


</div>


);


}
4 changes: 2 additions & 2 deletions frontend/src/app/events/EventsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ interface Event {

async function getEvents() {
const res = await fetch(`https://api3.langaracs.ca/events/all`, { cache: 'no-store' });
const events = await res.json();
return events;
let events = await res.json();
return events['events'];
}

export default async function EventsPage() {
Expand Down

0 comments on commit 2ce343b

Please sign in to comment.