mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
19 lines
446 B
TypeScript
19 lines
446 B
TypeScript
import styles from './player-image.module.css';
|
|
|
|
import { useSend } from '/@/remote/store';
|
|
|
|
interface PlayerImageProps {
|
|
src?: null | string;
|
|
}
|
|
export const PlayerImage = ({ src }: PlayerImageProps) => {
|
|
const send = useSend();
|
|
|
|
return (
|
|
<img
|
|
className={styles.container}
|
|
onError={() => send({ event: 'proxy' })}
|
|
src={src?.replaceAll(/&(size|width|height=\d+)/g, '')}
|
|
/>
|
|
);
|
|
};
|