- {ch?.banner_url && bannerAttempt <= MAX_BANNER_RETRIES ? (
+ {bannerSrc && bannerAttempt <= MAX_BANNER_RETRIES ? (
// Match YouTube's banner: the stored bannerExternalUrl is the full 16:9 template at a
// low default size, so request a crisp wide version (=w1707) and object-cover the
// desktop "safe area" — the centre 2560×423 (~6:1) band.
@@ -336,9 +342,12 @@ export default function ChannelPage({
// key forces a fresh
![]()
per attempt; the ?r= cache-buster on a retry bypasses the
// browser's negative cache (googleusercontent accepts an extra query param).
key={bannerAttempt}
- src={`${ch.banner_url}=w1707${bannerAttempt ? `?r=${bannerAttempt}` : ""}`}
+ src={bannerSrc}
alt=""
- className="w-full h-full object-cover object-center"
+ className={`w-full h-full object-cover object-center ${
+ bannerLoaded === bannerSrc ? "" : "opacity-0"
+ }`}
+ onLoad={() => setBannerLoaded(bannerSrc)}
onError={() => {
if (bannerAttempt <= MAX_BANNER_RETRIES) {
window.setTimeout(