Add friends#105
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Collaborator
Author
olukukoyi
commented
May 5, 2025
| } else | ||
| return ( | ||
| <> | ||
| <AddFriendModal |
Collaborator
Author
There was a problem hiding this comment.
explanation of this huge diff:
added modal to friends page and wrapped both the old code and the new modal in a fragment
olukukoyi
commented
May 5, 2025
| username: string; | ||
| }[]; | ||
|
|
||
| export async function findPeople(username: string) { |
Collaborator
Author
There was a problem hiding this comment.
a little helper fn to get all users in auth table are return them.
no error handling here bc
- if there are no results
datawill be an empty array. - if there was an error during the query,
datawill also be empty
i wanted this fn to be failsafe and simple
olukukoyi
commented
May 5, 2025
| if (timeoutRef.current) { | ||
| clearTimeout(timeoutRef.current); | ||
| } | ||
| timeoutRef.current = setTimeout(async () => { |
Collaborator
Author
There was a problem hiding this comment.
debouncing input changes to reduce the number of requests made to our db
IshmamF
requested changes
May 5, 2025
Owner
IshmamF
left a comment
There was a problem hiding this comment.
- 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.
MansijMishra
approved these changes
May 5, 2025
Collaborator
MansijMishra
left a comment
There was a problem hiding this comment.
lgtm, idk if you want to wait on @IshmamF's review.
IshmamF
approved these changes
May 5, 2025
Owner
IshmamF
left a comment
There was a problem hiding this comment.
Thanks for the changes, this looks good to me ! Amazing work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



closes #101