Skip to content

Add friends#105

Merged
olukukoyi merged 7 commits into
mainfrom
add-frends
May 5, 2025
Merged

Add friends#105
olukukoyi merged 7 commits into
mainfrom
add-frends

Conversation

@olukukoyi
Copy link
Copy Markdown
Collaborator

@olukukoyi olukukoyi commented May 5, 2025

Season 2 Hug GIF by Friends

closes #101

@olukukoyi olukukoyi self-assigned this May 5, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
meetsync ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2025 7:15pm

@olukukoyi
Copy link
Copy Markdown
Collaborator Author

Screenshot 2025-05-04 at 9 06 35 PM
Screenshot 2025-05-04 at 9 06 48 PM
Screenshot 2025-05-04 at 9 07 07 PM

} else
return (
<>
<AddFriendModal
Copy link
Copy Markdown
Collaborator Author

@olukukoyi olukukoyi May 5, 2025

Choose a reason for hiding this comment

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

explanation of this huge diff:

added modal to friends page and wrapped both the old code and the new modal in a fragment

username: string;
}[];

export async function findPeople(username: string) {
Copy link
Copy Markdown
Collaborator Author

@olukukoyi olukukoyi May 5, 2025

Choose a reason for hiding this comment

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

a little helper fn to get all users in auth table are return them.

no error handling here bc

  1. if there are no results data will be an empty array.
  2. if there was an error during the query, data will also be empty

i wanted this fn to be failsafe and simple

if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
}
timeoutRef.current = setTimeout(async () => {
Copy link
Copy Markdown
Collaborator Author

@olukukoyi olukukoyi May 5, 2025

Choose a reason for hiding this comment

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

debouncing input changes to reduce the number of requests made to our db

Copy link
Copy Markdown
Owner

@IshmamF IshmamF left a comment

Choose a reason for hiding this comment

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

  • Closing the modal brings up the loading spinner instead of just showing the page
  • feel like add friend should be at the top instead of at the bottom
  • might need to update the toast message when you hit cancel, because it treats a request you sent as a friend request you received. There's nothing that differentiates the two.

Copy link
Copy Markdown
Collaborator

@MansijMishra MansijMishra left a comment

Choose a reason for hiding this comment

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

lgtm, idk if you want to wait on @IshmamF's review.

Copy link
Copy Markdown
Owner

@IshmamF IshmamF left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, this looks good to me ! Amazing work

@olukukoyi olukukoyi merged commit da0b56a into main May 5, 2025
4 checks passed
@olukukoyi olukukoyi deleted the add-frends branch May 5, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Friend implementation on Frontend

3 participants