This commit is contained in:
seb
2026-08-01 02:08:39 +02:00
parent 6d720d34ed
commit 4ea593a0c8
7 changed files with 211 additions and 33 deletions

View File

@@ -13,14 +13,14 @@ export default function ArticlePhotoTile({
article: articleData,
onArticleUpdated,
wide = 1,
minHeight = 0,
minHeight = 200,
sx,
tileKey,
}) {
const fileInputRef = useRef(null);
const [busy, setBusy] = useState(false);
const photo = primaryPhoto(articleData);
const imageUrl = photo?.url;
const hasPhoto = photo?.thumbHash != null;
const uploadRawImage = async (rawBlob) => {
setBusy(true);
@@ -61,7 +61,7 @@ export default function ArticlePhotoTile({
sx={sx}
tileKey={tileKey}
action={
imageUrl
hasPhoto
? undefined
: {
label: 'Bild einfügen',
@@ -71,7 +71,7 @@ export default function ArticlePhotoTile({
}
}
>
<ArticlePhoto imageUrl={imageUrl} />
<ArticlePhoto photo={photo} />
</PanelTile>
<input
ref={fileInputRef}