This commit is contained in:
seb
2026-08-05 08:40:12 +02:00
parent a9e942df7a
commit 66f88e395b
12 changed files with 176 additions and 140 deletions

View File

@@ -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}