Fixed search. Now request relationship is next hurdle

This commit is contained in:
2024-10-18 16:52:46 -05:00
parent c0c6ad5af4
commit 77481b4ac4
2 changed files with 8 additions and 4 deletions

View File

@ -37,9 +37,13 @@ const RequestRelationship:
setSearchResults([]);
return;
}
const user = await getUser() as User;
setIsLoading(true);
const users: User[] = await searchUsers(encodeURIComponent(term)) as User[];
console.log(user.id, encodeURIComponent(term));
const users: User[] = await searchUsers(user.id, encodeURIComponent(term)) as User[];
console.log(users);
setSearchResults(users);
setIsLoading(false);
}, 300), []);
const handleSearch = async (text: string) => {