Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name: doc.title,
url: doc.webUrl,
previewImageSrc: doc.thumbnailUrl,
iconSrc: globalSettings.icons[iconProps.iconName].code.props.src // hack for file-type-icons
};
recentDocs.previewImages.push(previewImage);
documentCardDocTitle = ;
}
else {
let docs = this.props.group.driveRecentItems;
for (var i = 0; i < docs.length; i++) {
let iconProps: IIconProps = {};
switch (docs[i].fileType) {
case "folder":
iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
break;
default:
iconProps = getFileTypeIconProps({ extension: docs[i].fileType, size: 16 });
break;
}
let previewImage: IDocumentCardPreviewImage = {
name: docs[i].title,
url: docs[i].webUrl,
iconSrc: globalSettings.icons[iconProps.iconName].code.props.src // hack for file-type-icons
};
recentDocs.previewImages.push(previewImage);
}
}
libraryActivity = (
private getIconProps(fileSuffix: string): IIconProps {
let iconProps: IIconProps = {};
switch (fileSuffix) {
case "folder":
iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
break;
default:
iconProps = getFileTypeIconProps({ extension: fileSuffix, size: 16 });
break;
}
return iconProps;
}
}
private getIconProps(fileSuffix: string): IIconProps {
let iconProps: IIconProps = {};
switch (fileSuffix) {
case "folder":
iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
break;
default:
iconProps = getFileTypeIconProps({ extension: fileSuffix, size: 16 });
break;
}
return iconProps;
}