Skip to content

Commit

Permalink
Show cover image on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Dec 8, 2024
1 parent 848112c commit 027bf97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Version 0.4.0

To be released.

- The profile page now shows a user's cover image if they have one.


Version 0.3.0
-------------
Expand Down
11 changes: 9 additions & 2 deletions src/components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ export function Profile({ accountOwner }: ProfileProps) {
const bioHtml = renderCustomEmojis(account.bioHtml ?? "", account.emojis);
const url = account.url ?? account.iri;
return (
<>
<div>
{account.coverUrl && (
<img
src={account.coverUrl}
alt=""
style="margin-bottom: 1em; width: 100%;"
/>
)}
<hgroup>
{account.avatarUrl && (
<img
Expand Down Expand Up @@ -67,6 +74,6 @@ export function Profile({ accountOwner }: ProfileProps) {
</tbody>
</table>
)}
</>
</div>
);
}

0 comments on commit 027bf97

Please sign in to comment.