import React from "react";
import PropTypes from "prop-types";

const YoutubeEmbed = ({ embed_link }) => (
  <div className="overflow-auto h-64">
    <iframe
      width="853"
      height="480"
      // src={`https://www.youtube.com/embed/${embedId}`}
      src={embed_link}
      frameBorder="0"
      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
      allowFullScreen
      title="Embedded youtube"
      className="h-full w-full"
    />
  </div>
);

YoutubeEmbed.propTypes = {
  embedId: PropTypes.string.isRequired,
};

export default YoutubeEmbed;
