diff --git a/composables/useFetchFriendsFeed.ts b/composables/useFetchFriendsFeed.ts new file mode 100644 index 0000000..b99cba7 --- /dev/null +++ b/composables/useFetchFriendsFeed.ts @@ -0,0 +1,2 @@ +export const useFetchFriendsFeed = async () => + await $fetch("/api/feeds/friends"); diff --git a/layouts/feed.vue b/layouts/feed.vue index 2bc9adc..9f624ea 100644 --- a/layouts/feed.vue +++ b/layouts/feed.vue @@ -1,17 +1,34 @@ + + diff --git a/pages/index.vue b/pages/index.vue index 4a10eb9..6c47e00 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,5 +1,24 @@ + + diff --git a/types/posts.ts b/types/posts.ts index 3e34722..6f2012f 100644 --- a/types/posts.ts +++ b/types/posts.ts @@ -1,7 +1,7 @@ import type { Media } from "./types"; import type { User } from "./users"; -export interface Posts { +export interface UserPosts { user: User; momentId: string; region: string; // TODO: Specify all possible values @@ -66,8 +66,8 @@ export interface Music { } export interface FriendsFeed { - userPosts: Posts; - friendsPosts: Posts[]; + userPosts: UserPosts; + friendsPosts: UserPosts[]; remainingPosts: number; maxPostsPerMoment: number; }