1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00
This commit is contained in:
Michael Telatynski
2021-07-01 20:51:13 +01:00
parent 1f337b28ac
commit 12cce2a938

View File

@@ -15,7 +15,7 @@
*/
import React from 'react';
import {decode} from "blurhash";
import { decode } from "blurhash";
interface IProps {
blurhash: string;
@@ -38,7 +38,7 @@ export default class BlurhashPlaceholder extends React.PureComponent<IProps> {
if (!this.canvas.current) return;
try {
const {width, height} = this.props;
const { width, height } = this.props;
const pixels = decode(this.props.blurhash, Math.ceil(width), Math.ceil(height));
const ctx = this.canvas.current.getContext("2d");