Skip to content
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

Merged
merged 17 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = {
'jcfp.site',
'photos.google.com',
'photos.app.goo.gl',
't4.ftcdn.net',
'www.acmcyber.com',
'media.licdn.com',
'github.com',
'www.uclaacm.com',
'raw.githubusercontent.com',
],
Expand Down
21 changes: 18 additions & 3 deletions pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed?

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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to update position to role to match offoutput.json and in turn what OfficerCard component expects.

committee: officer.committee,
major: officer.major,
year: officer.year,
img: officer.photo,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to update img to photo to match offoutput.json and in turn what OfficerCard component expects.

})).filter(officer => officer.position.includes('President'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, will need to update position to role to match offoutput.json and in turn what OfficerCard component expects.

return convertedData;
}

function About() {
const { leadership } = data;
const filteredOfficers = extractContent(data);
return (
<Layout>
<NextSeo
Expand Down Expand Up @@ -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>
Expand Down
Loading