Update post-cards to show profile pic correctly
This commit is contained in:
parent
fd7d4eb5e2
commit
00acc262a0
|
@ -12,6 +12,7 @@ export type Post = {
|
|||
// denormalized user fields
|
||||
creatorName: string
|
||||
creatorUsername: string
|
||||
creatorAvatarUrl?: string
|
||||
}
|
||||
|
||||
export type DateDoc = Post & {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -29,7 +29,11 @@ export function PostCard(props: {
|
|||
<Row className="flex grow justify-between">
|
||||
<div className="">
|
||||
<Row className="items-center text-sm ">
|
||||
<Avatar className="mx-1 h-7 w-7" username={post.creatorUsername} />
|
||||
<Avatar
|
||||
className="mx-1 h-7 w-7"
|
||||
username={post.creatorUsername}
|
||||
avatarUrl={post.creatorAvatarUrl}
|
||||
/>
|
||||
<UserLink
|
||||
className=" text-gray-400"
|
||||
name={post.creatorName}
|
||||
|
|
Loading…
Reference in New Issue
Block a user