UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

20 lines (15 loc) 410 B
module.exports = { addTokenToImage(url, token, small, sizeFromParam) { if (url.indexOf('&size=small') > -1) { url = url.replace('&size=small', ''); } let size = ('&size=' + (sizeFromParam || 'small')); if (small) { size = '&size=icon'; } if (url && token && url.indexOf('blob?') > -1) { return url + size + '&access_token=' + token; } return url; } };