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
 |   // denormalized user fields
 | ||||||
|   creatorName: string |   creatorName: string | ||||||
|   creatorUsername: string |   creatorUsername: string | ||||||
|  |   creatorAvatarUrl?: string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export type DateDoc = Post & { | export type DateDoc = Post & { | ||||||
|  |  | ||||||
|  | @ -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) | ||||||
|  |  | ||||||
|  | @ -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} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user