Merge pull request 'fix: add background' (#99) from music into main

Reviewed-on: Kieran/stream#99
This commit is contained in:
Kieran 2023-09-19 09:16:44 +00:00
commit 6c127d4e9b
2 changed files with 5 additions and 0 deletions

View File

@ -117,6 +117,9 @@
align-items: center;
padding: 16px;
gap: 4px;
border-radius: 16px;
background: #222;
max-width: 340px;
}
.music .cover {
@ -127,4 +130,5 @@
.music .track {
margin: 0;
font-size: 14px;
}

View File

@ -12,6 +12,7 @@ export function Music({ link }: { link: NostrLink }) {
const expiry = nowPlaying && findTag(nowPlaying, "expiration");
const isExpired = expiry && Number(expiry) > unixNow();
return (
nowPlaying &&
!isExpired && (
<div className="music">
{cover && <img className="cover" src={cover} alt={nowPlaying.content} />}