Skip to content

Commit

Permalink
refactor: improved team sorting and added date of entry
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Dec 23, 2022
1 parent f91522b commit dc8dcc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/team/TeamMemberCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ const TeamMemberCard = ({
<div className="mt-2">
<h2 className="text-xl font-bold">{member.username}</h2>
<IconWithText icon={"discord-fill"} text={member.discord_tag} />
<IconWithText
icon={"calendar-event-fill"}
text={new Date(member.createdAt).toLocaleDateString()}
/>

<div className="mt-2" />

{member.email && (
<IconWithText icon={"mail-fill"} text={member.email} />
Expand Down
5 changes: 4 additions & 1 deletion src/pages/team/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ export const getServerSideProps = async () => {
},
});

const noxus = teamMembers.filter((t) => t.isAdmin);
const team = teamMembers.filter((t) => !t.isAdmin);

return {
props: superjson.serialize({ teamMembers }).json,
props: superjson.serialize({ teamMembers: [...noxus, ...team] }).json,
};
}
return {
Expand Down

1 comment on commit dc8dcc1

@vercel
Copy link

@vercel vercel bot commented on dc8dcc1 Dec 23, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.