Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

Commit 3d6676a

Browse files
committed
style: fix NowPlaying width overflow
1 parent dae6ddb commit 3d6676a

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/components/NowPlaying.jsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const NowPlaying = (props) => {
2626
useEffect(() => {
2727
const intervalId = setInterval(() => {
2828
fetchNowPlaying();
29-
}, 30000);
29+
}, 45000);
3030

3131
return () => clearInterval(intervalId);
3232
}, []);
@@ -38,8 +38,8 @@ export const NowPlaying = (props) => {
3838
)}
3939
{!loading && !isPlaying && (
4040
<div className="my-2 flex w-fit self-center truncate">
41-
<div className="mx-1 self-center">
42-
<BiSolidBarChartAlt2 size={20} />
41+
<div className="self-center">
42+
<BiSolidBarChartAlt2 size={20} className="mx-1" />
4343
</div>
4444
<p className="w-fit self-end text-xs">Currently Offline</p>
4545
</div>
@@ -52,17 +52,24 @@ export const NowPlaying = (props) => {
5252
</p>
5353
</div>
5454
<div className="flex self-center">
55-
<BiSolidBarChartAlt2 size={18} />
55+
<BiSolidBarChartAlt2 size={18} className="mx-1" />
5656
<img
5757
src={result.albumImageUrl}
5858
alt={`${result.title} album art`}
5959
className="mx-1 size-5 self-end rounded-md"
6060
/>
61-
<div className="flex self-center truncate text-xs font-bold">
62-
<a href={result.songUrl} target="_blank" className="min-md:w-40">
61+
<div className="min-md:w-40 flex self-center text-xs font-bold">
62+
<a
63+
href={result.songUrl}
64+
target="_blank"
65+
className="mx-1 overflow-x-scroll text-center max-md:max-w-44"
66+
>
6367
{result.title}
6468
</a>
65-
<p className="ml-1 truncate font-medium">{result.artist}</p>
69+
<p className="mx-1"></p>
70+
<p className="ml-1 truncate text-center font-medium max-md:max-w-36">
71+
{result.artist}
72+
</p>
6673
</div>
6774
</div>
6875
</div>

0 commit comments

Comments
 (0)