mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-26 04:10:44 +03:00
Fix borked image when restore from draft
This commit is contained in:
parent
aad855cafc
commit
4723358d2d
1 changed files with 2 additions and 1 deletions
|
@ -1477,7 +1477,8 @@ function MediaAttachment({
|
||||||
onRemove = () => {},
|
onRemove = () => {},
|
||||||
}) {
|
}) {
|
||||||
const supportsEdit = supports('@mastodon/edit-media-attributes');
|
const supportsEdit = supports('@mastodon/edit-media-attributes');
|
||||||
const { url, type, id } = attachment;
|
const { type, id, file } = attachment;
|
||||||
|
const url = file ? URL.createObjectURL(file) : attachment.url;
|
||||||
console.log({ attachment });
|
console.log({ attachment });
|
||||||
const [description, setDescription] = useState(attachment.description);
|
const [description, setDescription] = useState(attachment.description);
|
||||||
const suffixType = type.split('/')[0];
|
const suffixType = type.split('/')[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue