Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

857 B
Raw Blame
import type { ProfilePostItem } from "screens/ProfileScreen";
import type { SpaceProfilePost } from "services/space";

export const profilePostItemsFromPosts = (
    posts: SpaceProfilePost[],
): ProfilePostItem[] =>
    posts.map((post) => ({
        avatarUrl: post.avatarUrl,
        caption: post.caption,
        commentCount: post.commentCount,
        friendID: post.friendID,
        height: post.height,
        id: String(post.postId),
        imageAsset: post.imageAsset,
        imageUrl: post.imageUrl,
        photos: post.photos,
        isUnavailable: post.isUnavailable,
        likeCount: post.likeCount,
        name: post.name,
        postId: post.postId,
        spaceId: post.spaceId,
        timestampMs: post.timestampMs,
        thumbHash: post.thumbHash,
        viewerLiked: post.viewerLiked,
        width: post.width,
    }));