mirror of
https://github.com/System-End/site.git
synced 2026-04-20 00:25:19 +00:00
Conditionally render image and video
This commit is contained in:
parent
6c764d74f8
commit
c2e811e0cb
1 changed files with 29 additions and 29 deletions
|
|
@ -169,35 +169,35 @@ const ProjectView = ({
|
|||
gap: '10px'
|
||||
}}
|
||||
>
|
||||
{/* {imagesList.map((image, index) => ( */}
|
||||
<div
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={image}
|
||||
alt="Project Image"
|
||||
className={styles.image}
|
||||
/>
|
||||
</div>
|
||||
{/* ))} */}
|
||||
{/* {video.map((link, index) => ( */}
|
||||
<div
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<video sx={{ width: '100%', height: 'auto' }} controls>
|
||||
<source src={video} type="video/mp4" />
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
{/* ))} */}
|
||||
{ image != '' && (
|
||||
<div
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={image}
|
||||
alt="Project Image"
|
||||
className={styles.image}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{ video != '' && (
|
||||
<div
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<video sx={{ width: '100%', height: 'auto' }} controls>
|
||||
<source src={video} type="video/mp4" />
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<p
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue