This commit is contained in:
github-actions[bot] 2022-10-12 16:31:28 +00:00 committed by GitHub
commit d9fd90b964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ export type Post = {
// denormalized user fields // denormalized user fields
creatorName: string creatorName: string
creatorUsername: string creatorUsername: string
creatorAvatarUrl?: string
} }
export type DateDoc = Post & { export type DateDoc = Post & {

View File

@ -102,6 +102,7 @@ export const createpost = newEndpoint({}, async (req, auth) => {
contractSlug, contractSlug,
creatorName: creator.name, creatorName: creator.name,
creatorUsername: creator.username, creatorUsername: creator.username,
creatorAvatarUrl: creator.avatarUrl,
}) })
await postRef.create(post) await postRef.create(post)

View File

@ -29,7 +29,11 @@ export function PostCard(props: {
<Row className="flex grow justify-between"> <Row className="flex grow justify-between">
<div className=""> <div className="">
<Row className="items-center text-sm "> <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 <UserLink
className=" text-gray-400" className=" text-gray-400"
name={post.creatorName} name={post.creatorName}