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

added remotes to url

This commit is contained in:
Fedor Katurov 2019-10-12 12:04:30 +07:00
parent 1d89029848
commit a27ff0f52a

View file

@ -52,7 +52,11 @@ export const describeArc = (
].join(' ');
};
export const getURL = url => `${process.env.API_HOST}${url}`;
export const getURL = url => {
return url
.replace('REMOTE_OLD://', process.env.REMOTE_OLD)
.replace('REMOTE_CURRENT://', process.env.REMOTE_CURRENT);
};
export const getImageSize = (image: string, size?: string): string =>
`${process.env.API_HOST}${image}`.replace('{size}', size);