From a6dc708fc0890bf9e4b9b60db9b028d4e239678f Mon Sep 17 00:00:00 2001 From: Yohann Leon Date: Sat, 10 Oct 2020 04:02:09 +0200 Subject: [PATCH] fix: spotify widget wrong size (#1579) --- app/embeds/Spotify.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/embeds/Spotify.js b/app/embeds/Spotify.js index 317283091..bb0fc49e3 100644 --- a/app/embeds/Spotify.js +++ b/app/embeds/Spotify.js @@ -25,11 +25,21 @@ export default class Spotify extends React.Component { render() { const normalizedPath = this.pathname.replace(/^\/embed/, "/"); + var height; + + if (normalizedPath.includes("episode") || normalizedPath.includes("show")) { + height = 232; + } else if (normalizedPath.includes("track")) { + height = 80; + } else { + height = 380; + } + return (