Implement friends list and refactor components #28

Merged
twig merged 24 commits from friends-list into main 2025-07-12 17:28:43 +00:00
Showing only changes of commit 0d6786ffe9 - Show all commits

View file

@ -38,11 +38,11 @@ export const useApi = () => {
}
async function addFriend(username: string): Promise<void> {
await fetchWithApi('/me/friends', { method: "POST", body: { username } });
return await fetchWithApi('/me/friends', { method: "POST", body: { username } });
}
async function removeFriend(userId: string): Promise<void> {
await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" });
return await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" });
}
async function fetchMessages(channelId: string, options?: { amount?: number, offset?: number }): Promise<MessageResponse[] | undefined> {