Merge branch 'main' into password-reset
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
ci/woodpecker/pull_request_closed/build-and-publish Pipeline was successful

This commit is contained in:
SauceyRed 2025-07-16 17:46:45 +00:00
commit 52af245fdf
33 changed files with 373 additions and 195 deletions

View file

@ -33,8 +33,13 @@ export const useApi = () => {
return await fetchWithApi(`/users/${userId}`);
}
async function fetchFriends(): Promise<UserResponse[] | undefined> {
return await fetchWithApi('/me/friends')
async function fetchFriends(): Promise<UserResponse[]> {
const response = await fetchWithApi('/me/friends')
if (Array.isArray(response)) {
return response
} else {
return []
}
}
async function addFriend(username: string): Promise<void> {