From 00acc262a07442fac1b74d06056cc77323835c42 Mon Sep 17 00:00:00 2001 From: Pico2x Date: Wed, 12 Oct 2022 17:31:00 +0100 Subject: [PATCH] Update post-cards to show profile pic correctly --- common/post.ts | 1 + functions/src/create-post.ts | 1 + web/components/post-card.tsx | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/post.ts b/common/post.ts index ff90d614..4549b3be 100644 --- a/common/post.ts +++ b/common/post.ts @@ -12,6 +12,7 @@ export type Post = { // denormalized user fields creatorName: string creatorUsername: string + creatorAvatarUrl?: string } export type DateDoc = Post & { diff --git a/functions/src/create-post.ts b/functions/src/create-post.ts index 83adeb73..0bdb0894 100644 --- a/functions/src/create-post.ts +++ b/functions/src/create-post.ts @@ -102,6 +102,7 @@ export const createpost = newEndpoint({}, async (req, auth) => { contractSlug, creatorName: creator.name, creatorUsername: creator.username, + creatorAvatarUrl: creator.avatarUrl, }) await postRef.create(post) diff --git a/web/components/post-card.tsx b/web/components/post-card.tsx index f3e673fb..b474ff17 100644 --- a/web/components/post-card.tsx +++ b/web/components/post-card.tsx @@ -29,7 +29,11 @@ export function PostCard(props: {
- +