Skip to content

Commit

Permalink
Refactor: member status property type in Member component
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizendae committed Oct 19, 2024
1 parent 2d0d004 commit eb7192e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/about/member.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface MemberProps {
name: string;
x_handle: string;
profile_image: string;
status: string;
status: "active" | "past";
}
const { name, x_handle, profile_image } = Astro.props;
Expand Down
6 changes: 3 additions & 3 deletions src/components/about/team.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
import teamData from "./team-members.json";
import teamMembers from "./team-members.json";
import Member from "./member.astro";
import type { MemberProps } from "./member.astro";
const activeMembers: MemberProps[] = teamData.filter(
const activeMembers = (teamMembers as MemberProps[]).filter(
member => member.status === "active"
);
const pastMembers: MemberProps[] = teamData.filter(
const pastMembers = (teamMembers as MemberProps[]).filter(
member => member.status === "past"
);
---
Expand Down

0 comments on commit eb7192e

Please sign in to comment.