We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddceb4b commit 4a04fd9Copy full SHA for 4a04fd9
src/components/asset.tsx
@@ -19,12 +19,13 @@ const Asset: React.FC<{ block: BlockType }> = ({ block }) => {
19
block_width
20
} = format;
21
22
+ const aspectRatio = block_aspect_ratio || block_height / block_width;
23
+
24
if (type === "embed" || type === "video") {
25
return (
26
<div
27
style={{
- paddingBottom: `${(block_aspect_ratio || block_height / block_width) *
- 100}%`,
28
+ paddingBottom: `${aspectRatio * 100}%`,
29
position: "relative"
30
}}
31
>
@@ -43,7 +44,7 @@ const Asset: React.FC<{ block: BlockType }> = ({ block }) => {
43
44
45
46
- paddingBottom: `${block_aspect_ratio * 100}%`,
47
48
49
50
0 commit comments