1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixes and cleanups

This commit is contained in:
Fedor Katurov 2019-11-07 12:22:28 +07:00
parent 1320f0851f
commit 4c373dd57c

View file

@ -63,7 +63,7 @@ export const getURL = (file: Partial<IFile>, size?: typeof PRESETS[keyof typeof
if (size) {
return file.url
.replace('REMOTE_CURRENT://', `${process.env.REMOTE_CURRENT}/cache/${size}/`)
.replace('REMOTE_CURRENT://', `${process.env.REMOTE_CURRENT}cache/${size}/`)
.replace('REMOTE_OLD://', process.env.REMOTE_OLD);
}
@ -72,9 +72,6 @@ export const getURL = (file: Partial<IFile>, size?: typeof PRESETS[keyof typeof
.replace('REMOTE_OLD://', process.env.REMOTE_OLD);
};
// export const getImageSize = (file: IFile, size?: string): string => getURL(file);
// `${process.env.API_HOST}${image}`.replace('{size}', size);
export const formatText = (text: string): string =>
!text
? ''