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:
parent
a27ff0f52a
commit
6c1e88804b
7 changed files with 24 additions and 15 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue