mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
fix: spotify widget wrong size (#1579)
This commit is contained in:
1 parent
9c8f125668
commit
a6dc708fc0
1 file changed
+12
-2
+12
-2
@@ -25,11 +25,21 @@ export default class Spotify extends React.Component<Props> {
|
||||
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 (
|
||||
<Frame
|
||||
{...this.props}
|
||||
width="300px"
|
||||
height="380px"
|
||||
width="100%"
|
||||
height={`${height}px`}
|
||||
src={`https://open.spotify.com/embed${normalizedPath}`}
|
||||
title="Spotify Embed"
|
||||
allow="encrypted-media"
|
||||
|
||||
Reference in new issue
Block a user