Attempted to fix iOS bug

This commit is contained in:
Morten Olsen
2021-08-27 22:19:11 +02:00
parent 4606cbec9c
commit a24b8f4282
2 changed files with 3 additions and 3 deletions

View File

@@ -80,8 +80,8 @@ const Me: React.FC<{}> = () => {
const imgRef = useRef<HTMLImageElement>(); const imgRef = useRef<HTMLImageElement>();
const [loaded, setLoaded] = useState(false); const [loaded, setLoaded] = useState(false);
useEffect(() => { useEffect(() => {
if (imgRef.current) { if (imgRef.current && imgRef.current.complete) {
setLoaded(imgRef.current.complete); setLoaded(true);
} }
}, [imgRef]); }, [imgRef]);
return ( return (

View File

@@ -31,7 +31,7 @@ const Wrapper = styled.div`
align-items: center; align-items: center;
height: 100%; height: 100%;
flex-wrap: wrap; flex-wrap: wrap;
max-width: 1000px; max-width: 1600px;
`; `;
const ItemWrapper = styled.a` const ItemWrapper = styled.a`