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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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';
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),
committee: officer.committee,
major: officer.major,
year: officer.year,
img: officer.photo,
})).filter(officer => officer.position.includes('President'));
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