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

displaying profile photo

This commit is contained in:
Fedor Katurov 2019-10-12 14:51:05 +07:00
parent a27ff0f52a
commit 6c1e88804b
7 changed files with 24 additions and 15 deletions

View file

@ -1,3 +1,5 @@
import { IFile } from '~/redux/types';
export const getStyle = (oElm: any, strCssRule: string) => {
if (document.defaultView && document.defaultView.getComputedStyle) {
return document.defaultView.getComputedStyle(oElm, '').getPropertyValue(strCssRule);
@ -52,8 +54,10 @@ export const describeArc = (
].join(' ');
};
export const getURL = url => {
return url
export const getURL = (file: IFile) => {
if (!file || !file.url) return null;
return file.url
.replace('REMOTE_OLD://', process.env.REMOTE_OLD)
.replace('REMOTE_CURRENT://', process.env.REMOTE_CURRENT);
};