Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const ArticleLeadAssetImage = ({
caption,
credits,
crop11,
crop23,
crop32,
crop45,
crop169,
crop1251,
width
}) => {
const crop = getStandardTemplateCrop({
crop11,
crop23,
crop32,
crop45,
crop169,
crop1251
});
if (crop === null) {
return null;
}
const { ratio, url } = crop;
const [ratioWidth, ratioHeight] = ratio.split(":");
const aspectRatio = ratioWidth / ratioHeight;
const ArticleLeadAssetVideo = ({
brightcoveVideoId,
brightcovePolicyKey,
brightcoveAccountId,
posterImage,
onVideoPress,
skySports
}) => {
const crop = getStandardTemplateCrop(posterImage);
const { ratio, url } = crop;
const [ratioWidth, ratioHeight] = ratio.split(":");
const aspectRatio = ratioWidth / ratioHeight;
const width = screenWidth();
const height = width / aspectRatio;
return (