diff --git a/components/Avatar.vue b/components/Avatar.vue index 5f16251..23aae79 100644 --- a/components/Avatar.vue +++ b/components/Avatar.vue @@ -12,6 +12,8 @@ import { NuxtImg } from '#components'; import type { GuildMemberResponse, UserResponse } from '~/types/interfaces'; +const { getDisplayName } = useProfile() + const props = defineProps<{ profile: UserResponse | GuildMemberResponse, }>(); diff --git a/components/Guild/MemberEntry.vue b/components/Guild/MemberEntry.vue index 4177ca2..d9ce4f6 100644 --- a/components/Guild/MemberEntry.vue +++ b/components/Guild/MemberEntry.vue @@ -11,6 +11,8 @@ import { ModalProfilePopup } from '#components'; import type { GuildMemberResponse } from '~/types/interfaces'; +const { getDisplayName } = useProfile() + const props = defineProps<{ member: GuildMemberResponse }>(); @@ -18,12 +20,10 @@ const props = defineProps<{ const modalPopupVisible = ref(false); function showModalPopup() { - console.log("hello there") modalPopupVisible.value = true } function hideModalPopup() { - console.log("gone") modalPopupVisible.value = false } diff --git a/components/Me/AddFriend.vue b/components/Me/AddFriend.vue index 6d2d888..43249fb 100644 --- a/components/Me/AddFriend.vue +++ b/components/Me/AddFriend.vue @@ -23,9 +23,11 @@ async function sendRequest() { try { await addFriend(inputField.value.value) alert("Friend request sent!") - } catch { - alert("Request failed :(") - } + } catch (error: any) { + if (error?.response?.status !== 200) { + alert(`error ${error?.response?.status} met whilst trying to add friend\n"${error?.response._data?.message}"`) + } + } } } diff --git a/components/Me/FriendsList.vue b/components/Me/FriendsList.vue index 0a1481e..25b9924 100644 --- a/components/Me/FriendsList.vue +++ b/components/Me/FriendsList.vue @@ -24,6 +24,8 @@