Remove star button from AlbumPage; conditionally render PopularSongs section in ArtistPage based on mobile view
This commit is contained in:
@@ -173,14 +173,6 @@ export default function AlbumPage() {
|
|||||||
>
|
>
|
||||||
<Play className="w-6 h-6" />
|
<Play className="w-6 h-6" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
onClick={handleStar}
|
|
||||||
variant="ghost"
|
|
||||||
className="w-12 h-12 rounded-full p-0"
|
|
||||||
title={isStarred ? "Unstar album" : "Star album"}
|
|
||||||
>
|
|
||||||
<Heart className={`w-6 h-6 ${isStarred ? 'text-primary' : 'text-gray-500'}`} fill={isStarred ? 'var(--primary)' : ""}/>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';
|
|||||||
import Loading from '@/app/components/loading';
|
import Loading from '@/app/components/loading';
|
||||||
import { getNavidromeAPI } from '@/lib/navidrome';
|
import { getNavidromeAPI } from '@/lib/navidrome';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
|
import { useIsMobile } from '@/hooks/use-mobile';
|
||||||
|
|
||||||
export default function ArtistPage() {
|
export default function ArtistPage() {
|
||||||
const { artist: artistId } = useParams();
|
const { artist: artistId } = useParams();
|
||||||
@@ -27,6 +28,7 @@ export default function ArtistPage() {
|
|||||||
const { getArtist, starItem, unstarItem } = useNavidrome();
|
const { getArtist, starItem, unstarItem } = useNavidrome();
|
||||||
const { playArtist } = useAudioPlayer();
|
const { playArtist } = useAudioPlayer();
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const api = getNavidromeAPI();
|
const api = getNavidromeAPI();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -152,7 +154,7 @@ export default function ArtistPage() {
|
|||||||
<ArtistBio artistName={artist.name} />
|
<ArtistBio artistName={artist.name} />
|
||||||
|
|
||||||
{/* Popular Songs Section */}
|
{/* Popular Songs Section */}
|
||||||
{popularSongs.length > 0 && (
|
{!isMobile && popularSongs.length > 0 && (
|
||||||
<PopularSongs songs={popularSongs} artistName={artist.name} />
|
<PopularSongs songs={popularSongs} artistName={artist.name} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user