fix(board): unwrap API envelope in composables, isolate member profile fetch

This commit is contained in:
Jennie Robinson Faber 2026-04-14 17:24:30 +01:00
parent f8bc5502ba
commit 4b3ba411dd
3 changed files with 7 additions and 8 deletions

View file

@ -249,12 +249,11 @@ const tagLabel = (pool, slug) => {
const craftTagsDisplay = computed(() => member.value?.craftTags || []);
// Board posts authored by this member
const memberPosts = ref([]);
onMounted(async () => {
const { fetchPosts } = useBoardPosts();
const result = await fetchPosts({ author: id });
memberPosts.value = result || [];
});
const { data: postsData } = useFetch(`/api/board/posts`, {
params: { author: id },
default: () => ({ posts: [] }),
})
const memberPosts = computed(() => postsData.value?.posts || [])
const postExcerpt = (post) => {
const text = post.seeking || post.offering || "";