Skip to content

Commit

Permalink
removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrks committed Aug 27, 2024
1 parent 28ed52d commit 71f822d
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions src/components/NavItems/tools/C2pa/Results/C2paResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,85 +75,6 @@ const C2paResults = (props = { result, handleClose }) => {
dispatch(c2paCurrentImageIdSet(ingredientId));
};

// const displayMedia = (url) => {
// var media;
// var testImage = new Image();
// testImage.src = url;
// testImage.onload = () => {
// console.log("loaded");

// media = (
// <>
// <img
// src={url}
// style={{
// maxWidth: "100%",
// maxHeight: "60vh",
// borderRadius: "10px",
// }}
// />
// </>
// );
// };
// testImage.onerror = () => {
// media = (
// <>
// <video
// style={{
// maxWidth: "100%",
// maxHeight: "60vh",
// borderRadius: "10px",
// }}
// controls
// key={url}
// >
// <source src={url} />
// </video>
// </>
// );
// };
// return media;

// if(media.width !== 0) {
// console.log(media.width);
// return (
// <>
// <img
// src={url}
// style={{
// maxWidth: "100%",
// maxHeight: "60vh",
// borderRadius: "10px",
// }}
// />
// </>)
// }
// else {
// console.log("displaying video");
// return (
// <>
// <video
// style={{
// maxWidth: "100%",
// maxHeight: "60vh",
// borderRadius: "10px",
// }}
// controls
// key={url}
// >
// <source
// src={url}
// />
// </video>
// </>)
// }

// function isImgUrl(url) {
// return fetch(url, {method: 'HEAD'}).then(res => {
// return res.headers.get('Content-Type').startsWith('image')
// })
// }

useEffect(() => {
var testImage = new Image();
testImage.src = url;
Expand Down

0 comments on commit 71f822d

Please sign in to comment.