u
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { PureComponent } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import { thumbHashToDataURL } from 'thumbhash';
|
||||
import { thumbHashToDataURL, thumbHashToRGBA } from 'thumbhash';
|
||||
|
||||
export default class ThumbHashImage extends PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
//move this to where it'S loaded
|
||||
const bytes = Uint8Array.from(atob(props.thumbHash), (c) => c.charCodeAt(0));
|
||||
this.url = thumbHashToDataURL(bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user