We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
convertFileSrc
1 parent 5f41b1a commit 4b55e1aCopy full SHA for 4b55e1a
src/pages/Clipboard/Panel/components/List/components/Item/components/Image/index.tsx
@@ -9,17 +9,7 @@ interface ImageProps extends Partial<HistoryTablePayload> {
9
const Image: FC<ImageProps> = (props) => {
10
const { value = "", className = "max-h-full" } = props;
11
12
- const [src, setSrc] = useState("");
13
-
14
- useAsyncEffect(async () => {
15
- if (!value) return;
16
17
- const src = await convertFileSrc(value);
18
19
- setSrc(src);
20
- }, [value]);
21
22
- return <img src={src} className={className} />;
+ return <img src={convertFileSrc(value)} className={className} />;
23
};
24
25
export default memo(Image);
0 commit comments