bug: use page width for banner

This commit is contained in:
2023-01-31 16:07:46 +00:00
parent 08acab4831
commit 14769f8f33
2 changed files with 132 additions and 131 deletions

View File

@ -2,13 +2,13 @@ import useImgProxy from "Feed/ImgProxy";
import { useEffect, useState } from "react";
export const ProxyImg = (props: any) => {
const { src, ...rest } = props;
const { src, size, ...rest } = props;
const [url, setUrl] = useState<string>();
const { proxy } = useImgProxy();
useEffect(() => {
if (src) {
proxy(src)
proxy(src, size)
.then(a => setUrl(a))
.catch(console.warn);
}