@ -1,6 +1,7 @@
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import { useEffect, useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { getUrlHostname } from "Util";
|
||||
|
||||
interface ProxyImgProps extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
|
||||
size?: number;
|
||||
@ -34,7 +35,7 @@ export const ProxyImg = (props: ProxyImgProps) => {
|
||||
<FormattedMessage
|
||||
defaultMessage="Failed to proxy image from {host}, click here to load directly"
|
||||
values={{
|
||||
host: new URL(src ?? "").hostname,
|
||||
host: getUrlHostname(src),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user