0
0
Fork 0

Enforce stricter rules for Typescript files (#24910)

This commit is contained in:
Renaud Chaput 2023-05-09 03:11:56 +02:00 committed by GitHub
parent 64ec41d89c
commit c8181eb0a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
123 changed files with 175 additions and 186 deletions

View file

@ -9,13 +9,13 @@ type Props = {
children?: never;
[key: string]: any;
}
function Blurhash({
const Blurhash: React.FC<Props> = ({
hash,
width = 32,
height = width,
dummy = false,
...canvasProps
}: Props) {
}) => {
const canvasRef = useRef<HTMLCanvasElement>(null);
useEffect(() => {
@ -40,6 +40,8 @@ function Blurhash({
return (
<canvas {...canvasProps} ref={canvasRef} width={width} height={height} />
);
}
};
export default React.memo(Blurhash);
const MemoizedBlurhash = React.memo(Blurhash);
export { MemoizedBlurhash as Blurhash };