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

Disambiguate members with the same name #146

Merged
merged 4 commits into from
Nov 23, 2023
Merged
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
2 changes: 1 addition & 1 deletion components/AboutTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Alumni() {
{yearsAndAlumni.map(([graduation, alumni]) => (
<ProfileCardGroup
key={graduation}
title={typeof graduation === "number" ? `Class of ${graduation}` : graduation}
title={`Class of ${graduation}`}
profiles={alumni.map((alumnus, index) => (
<MemberProfileCard member={alumnus} roleLimit={100} key={index} />
))}
Expand Down
8 changes: 3 additions & 5 deletions components/ArrowLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ export default function ArrowLink({ href, children, dark }: ArrowLinkProps) {
<BsBoxArrowUpRight style={{ position: "relative", top: "-0.2em", ...arrowStyles }} />
</a>
) : (
<Link href={href}>
<a className={className}>
{children}
<BsArrowRight style={arrowStyles} />
</a>
<Link href={href} className={className}>
{children}
<BsArrowRight style={arrowStyles} />
</Link>
)}
</span>
Expand Down
6 changes: 2 additions & 4 deletions components/BigCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ export default function BigCard({
<Card.Title style={{ fontWeight: 600 }}>{title}</Card.Title>
{children}
</Card.Body>
<Link href={href}>
<a className="stretched-link">
<span className="visually-hidden">Learn more</span>
</a>
<Link href={href} className="stretched-link">
<span className="visually-hidden">Learn more</span>
</Link>
</Card>
);
Expand Down
2 changes: 1 addition & 1 deletion components/CustomImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image, { ImageProps } from "next/image";
import Image, { ImageProps } from "next/legacy/image";
import React from "react";

import { getImage, ImageKey, staticLoader } from "../images";
Expand Down
2 changes: 1 addition & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function FooterItem({ href, children }: { href: string; children: React.ReactNod
{children}
</Nav.Link>
) : (
<Link href={href} passHref>
<Link href={href} passHref legacyBehavior>
<Nav.Link {...navLinkProps}>{children}</Nav.Link>
</Link>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/MemberProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function MemberProfileCard({ member, roleLimit }: MemberProfileCa
<ProfileCard name={member.name} subtitles={subtitles}>
<RatioImage
aspectRatio={[1, 1]}
imageKey={firstValidImageKey(`members/${makeSlug(member.name)}`, "icons/tse-bulb")}
imageKey={firstValidImageKey(`members/${makeSlug(member.id)}`, "icons/tse-bulb")}
alt={`Profile photo of ${member.name}`}
/>
</ProfileCard>
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CustomImage from "./CustomImage";
function NavbarItem({ href, children }: { href: string; children: React.ReactNode }) {
return (
<Nav.Item as="li">
<Link href={href} passHref>
<Link href={href} passHref legacyBehavior>
<Nav.Link className="px-3">{children}</Nav.Link>
</Link>
</Nav.Item>
Expand All @@ -21,7 +21,7 @@ export default function Navbar() {
<BsNavbar expand="lg" bg="dark" variant="dark" style={{ background: "#18232a" }}>
<Container>
<BsNavbar.Brand className="py-0">
<Link href="/" passHref>
<Link href="/" passHref legacyBehavior>
<a style={{ position: "relative", top: "3px" }}>
<CustomImage imageKey="icons/tse-bulb" alt="Logo" width={50} height={50} />
</a>
Expand Down
4 changes: 2 additions & 2 deletions components/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default function ProfileCard({ name, subtitles, href, children }: Profile
</Card.Text>
))}
{href !== undefined && (
<Link href={href}>
<a className="stretched-link">Learn more</a>
<Link href={href} className="stretched-link">
Learn more
</Link>
)}
</Card>
Expand Down
Loading
Loading