delint
parent
1f337b28ac
commit
12cce2a938
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {decode} from "blurhash";
|
import { decode } from "blurhash";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
blurhash: string;
|
blurhash: string;
|
||||||
|
@ -38,7 +38,7 @@ export default class BlurhashPlaceholder extends React.PureComponent<IProps> {
|
||||||
if (!this.canvas.current) return;
|
if (!this.canvas.current) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {width, height} = this.props;
|
const { width, height } = this.props;
|
||||||
|
|
||||||
const pixels = decode(this.props.blurhash, Math.ceil(width), Math.ceil(height));
|
const pixels = decode(this.props.blurhash, Math.ceil(width), Math.ceil(height));
|
||||||
const ctx = this.canvas.current.getContext("2d");
|
const ctx = this.canvas.current.getContext("2d");
|
||||||
|
|
Loading…
Reference in New Issue