mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
282 B
TypeScript
10 lines
282 B
TypeScript
|
4 years ago
|
import React, { ImgHTMLAttributes } from 'react';
|
||
|
4 years ago
|
import { parseUrlStr } from '../utils';
|
||
|
|
|
||
|
4 years ago
|
export const Image: React.FC<ImgHTMLAttributes<HTMLImageElement>> = React.memo(
|
||
|
|
(props) => {
|
||
|
|
return <img {...props} src={parseUrlStr(props.src)} />;
|
||
|
|
}
|
||
|
|
);
|
||
|
4 years ago
|
Image.displayName = 'Image';
|