fix: add background

This commit is contained in:
verbiricha 2023-09-19 10:47:21 +02:00
parent fb4201efe0
commit 6e1979a3b4
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} />}