import React from 'react';
import { Illustration } from '../Illustrations';
const baseUrl = 'https://ipfs.io/ipfs/';
const manipulateLink = (imgLink: string) => {
if (imgLink.startsWith('ipfs://')) {
const case1 = 'ipfs://ipfs/';
const case2 = 'ipfs://';
if (imgLink.slice(0, case1.length) === case1) {
return `${baseUrl}${imgLink.slice(case1.length)}`;
} else if (imgLink.slice(0, case2.length) === case2) {
return `${baseUrl}${imgLink.slice(case2.length)}`;
}
}
return imgLink;
};
const image = (animation?: string, image?: string): React.ReactElement => {
if (animation?.includes('.mp4') || image?.includes('.mp4')) {
return (
);
}
if (image) {
if (image.includes('pinata')) {
return
;
}
return (
);
}
if (animation) {
if (animation.includes('pinata')) {
return
;
}
return (
);
}
return ;
};
export default {
image,
};