Skip to content

Commit

Permalink
Remove undefined conditions and unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantom0110 committed Dec 12, 2023
1 parent 6d9ae34 commit d949dd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/app/about/officer-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const officerCardData: OfficerCardProps[] = [
],
},
{
position: "Tresurer",
position: "Treasurer",
image: "public/officers/Stephen_Coomes.jpg",
name: "Stephen Coomes",
socialLinksData: [
Expand Down Expand Up @@ -387,7 +387,7 @@ export const officerData: { [key: string]: OfficerCardProps } = {
};

export const positionData: {
[key: string]: { [key: string]: OfficerCardProps | undefined };
[key: string]: { [key: string]: OfficerCardProps};
} = {
"Fall 2023": {
President: officerData.yonas_bahre,
Expand Down
15 changes: 0 additions & 15 deletions src/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,10 @@ import OfficerCard from "./officer-card";
import { positionData } from "./officer-data";

export default function About() {
// const officerCards = officerCardData.map((cardData) => (
// <OfficerCard
// key={cardData.position}
// position={cardData.position}
// image={cardData.image}
// name={cardData.name}
// socialLinksData={cardData.socialLinksData}
// />
// ));

const officerCardSection = Object.entries(positionData).map(
([semester, officers]) => {
const officerCards = Object.entries(officers).map(
([position, officer]) => {
if (officer === undefined) {
return <div key={`${semester} ${position}`} />;
}

return (
<OfficerCard
key={`${semester} ${position}`}
Expand Down Expand Up @@ -71,7 +57,6 @@ export default function About() {
<section className={styles.officers}>
<div className={styles.container}>
<h2>Officers</h2>
{/* <div className={styles.cardContainer}>{officerCards}</div> */}
{officerCardSection}
</div>
</section>
Expand Down

0 comments on commit d949dd3

Please sign in to comment.