magnet links opening in new tab

This commit is contained in:
2025-07-17 22:51:45 +03:00
parent fc523da998
commit 0c938231df

View File

@@ -138,14 +138,22 @@ export default function TorrentSelector({ imdbId, type, totalSeasons }: TorrentS
return ( return (
<Button <Button
key={torrent.magnet} key={torrent.magnet}
asChild
onClick={() => handleQualitySelect(torrent)} onClick={() => handleQualitySelect(torrent)}
variant="outline" variant="outline"
className="w-full items-center text-left px-3 py-2" className="w-full items-center text-left px-3 py-2"
>
<a
href={torrent.magnet}
target="_blank"
rel="noopener noreferrer"
className="flex w-full items-center"
> >
<span className="flex-1 truncate whitespace-nowrap overflow-hidden">{label}</span> <span className="flex-1 truncate whitespace-nowrap overflow-hidden">{label}</span>
{size !== undefined && ( {size !== undefined && (
<span className="text-xs text-muted-foreground">{size.toFixed(2)} GB</span> <span className="text-xs text-muted-foreground">{size.toFixed(2)} GB</span>
)} )}
</a>
</Button> </Button>
); );
}); });