-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update About Page Leadership Section #691
Changes from 8 commits
d41a6ba
6e7ad47
900b606
968b285
5edbbd1
f901aa2
f95981a
b91bf96
1b94c54
4ef03cc
9ed61a8
f1eae12
04cff17
96a168a
319f93b
65cafc4
ac3364c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,32 @@ import React from 'react'; | |
import Banner from '../components/Banner'; | ||
import Layout from '../components/Layout'; | ||
import Officers from '../components/OfficerCard'; | ||
// import Officers from '../components/Officers/OfficerCard'; | ||
import SocialMedia from '../components/SocialMedia'; | ||
import data from '../data'; | ||
import data from '../offoutput.json'; | ||
|
||
import acmCommittees from '../public/images/acm_committees.png'; | ||
import boardcollage from '../public/images/boardcollage.png'; | ||
import acmHowToJoin from '../public/images/how-to-join.png'; | ||
import initiative from '../public/images/initiative.png'; | ||
import styles from '../styles/pages/About.module.scss'; | ||
|
||
|
||
function extractContent(officerContent) { | ||
const convertedData = officerContent.map(officer => ({ | ||
name: officer.name, | ||
pronouns: officer.pronouns, | ||
position: (officer.role === officer.committee ? officer.role : officer.role + ', ' + officer.committee), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to update |
||
committee: officer.committee, | ||
major: officer.major, | ||
year: officer.year, | ||
img: officer.photo, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to update |
||
})).filter(officer => officer.position.includes('President')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, will need to update |
||
return convertedData; | ||
} | ||
|
||
function About() { | ||
const { leadership } = data; | ||
const filteredOfficers = extractContent(data); | ||
return ( | ||
<Layout> | ||
<NextSeo | ||
|
@@ -192,7 +207,7 @@ function About() { | |
<p>Our President and Internal/External Vice Presidents support the entire ACM community | ||
while our committee presidents foster the growth of their committee.</p> | ||
<div className="grid-desktop-3"> | ||
<Officers officers={leadership} size="compact" /> | ||
<Officers officers={filteredOfficers} size="compact" /> | ||
</div> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed?