u
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { Component } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import { thumb } from '../../api';
|
||||
import { StorageManagerContext } from '../../api/storageManager';
|
||||
import ThumbHashImage from './ThumbHashImage';
|
||||
|
||||
class ArticlePhoto extends Component {
|
||||
static contextType = StorageManagerContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { thumbLoaded: false };
|
||||
@@ -78,7 +80,7 @@ class ArticlePhoto extends Component {
|
||||
{fullHash ? (
|
||||
<Box
|
||||
component="img"
|
||||
src={thumb.url(fullHash)}
|
||||
src={this.context.thumb.url(fullHash)}
|
||||
alt=""
|
||||
onLoad={this.handleThumbLoad}
|
||||
onError={this.handleThumbError}
|
||||
|
||||
Reference in New Issue
Block a user