File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
website/src/blocks/MediaBlock
with-vercel-website/src/blocks/MediaBlock Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,13 @@ export const MediaBlock: React.FC<Props> = (props) => {
42
42
className ,
43
43
) }
44
44
>
45
- < Media
46
- imgClassName = { cn ( 'border border-border rounded-[0.8rem]' , imgClassName ) }
47
- resource = { media }
48
- src = { staticImage }
49
- />
45
+ { ( media || staticImage ) && (
46
+ < Media
47
+ imgClassName = { cn ( 'border border-border rounded-[0.8rem]' , imgClassName ) }
48
+ resource = { media }
49
+ src = { staticImage }
50
+ />
51
+ ) }
50
52
{ caption && (
51
53
< div
52
54
className = { cn (
Original file line number Diff line number Diff line change @@ -42,11 +42,13 @@ export const MediaBlock: React.FC<Props> = (props) => {
42
42
className ,
43
43
) }
44
44
>
45
- < Media
46
- imgClassName = { cn ( 'border border-border rounded-[0.8rem]' , imgClassName ) }
47
- resource = { media }
48
- src = { staticImage }
49
- />
45
+ { ( media || staticImage ) && (
46
+ < Media
47
+ imgClassName = { cn ( 'border border-border rounded-[0.8rem]' , imgClassName ) }
48
+ resource = { media }
49
+ src = { staticImage }
50
+ />
51
+ ) }
50
52
{ caption && (
51
53
< div
52
54
className = { cn (
You can’t perform that action at this time.
0 commit comments