Skip to content

Commit

Permalink
refactor: Add conditional rendering for YouTube video in InfoYoutubeM…
Browse files Browse the repository at this point in the history
…odal component
  • Loading branch information
zushar committed Jun 12, 2024
1 parent 8118f3c commit 505abed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pages/components/YoutubeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ const InfoYoutubeModal = ({ videoUrl, label, title }: InfoYoutubeModalProps) =>
onCancel={() => {
setVisible(false)
}}>
<div className="modal-iframe-container">
<iframe allowFullScreen src={videoUrl} />
</div>
{videoUrl.includes('youtube') ? (
<div className="modal-iframe-container">
<iframe allowFullScreen src={videoUrl} />
</div>
) : (
<></>
)}
</Modal>
</>
)
}

export default InfoYoutubeModal

0 comments on commit 505abed

Please sign in to comment.