diff --git a/ui/component/loginGraphic/index.jsx b/ui/component/loginGraphic/index.jsx index cefc65753..57f32b1f2 100644 --- a/ui/component/loginGraphic/index.jsx +++ b/ui/component/loginGraphic/index.jsx @@ -1,37 +1,13 @@ // @flow import React from 'react'; import { SITE_NAME, LOGIN_IMG_URL } from 'config'; -import { getThumbnailCdnUrl } from 'util/thumbnail'; function LoginGraphic(props: any) { - const [error, setError] = React.useState(false); - const [src, setSrc] = React.useState('---'); - const containerRef = React.useRef(); - const imgUrl = LOGIN_IMG_URL; - - React.useEffect(() => { - if (containerRef.current && containerRef.current.parentElement && containerRef.current.parentElement.offsetWidth) { - const newWidth = containerRef.current.parentElement.offsetWidth; - - let newSrc = imgUrl && imgUrl.trim().replace(/^http:\/\//i, 'https://'); - // @if TARGET='web' - // Pass image urls through a compression proxy. - newSrc = getThumbnailCdnUrl({ thumbnail: newSrc, width: newWidth, height: newWidth * 2 }); - // @endif - - setSrc(newSrc); - } else { - setSrc(imgUrl); - } - }, []); - - if (error || !imgUrl) { - return null; - } + const alt = __('%SITE_NAME% login', { SITE_NAME }); return ( -
- {__('%SITE_NAME% setError(true)} /> +
+ {alt}
); }