Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
danitome24 committed Sep 18, 2024
1 parent b8588f7 commit 2b145b2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/nextjs/app/builders/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,11 @@ const getRandomUserImage = () => {
return `https://randomuser.me/api/portraits/${randomGender}/${randomInt}.jpg`;
};

const getBuilderFromEvent = (event: any): Builder => {
const args = event.args;

const person: Builder = {
image: getRandomUserImage(),
link: "builders/" + args.builder,
checkedIn: true,
};

return person;
};
const getBuilderFromEvent = (event: any): Builder => ({
image: getRandomUserImage(),
link: "builders/" + event.args.builder,
checkedIn: true,
});

const mentors: Mentor[] = [
{
Expand Down

0 comments on commit 2b145b2

Please sign in to comment.