Move tokenState to work without backing token, add asset sync

This commit is contained in:
Mitchell McCaffrey
2021-04-23 17:10:10 +10:00
parent a023ef61ed
commit 245a9cee43
13 changed files with 198 additions and 285 deletions

View File

@@ -252,13 +252,15 @@ function SelectMapModal({
height: resized.height,
id: assetId,
mime: file.type,
owner: userId,
};
assets.push(asset);
}
}
}
// Create thumbnail
const thumbnail = await createThumbnail(image, file.type);
const thumbnailImage = await createThumbnail(image, file.type);
const thumbnail = { ...thumbnailImage, id: uuid(), owner: userId };
assets.push(thumbnail);
const fileAsset = {
@@ -267,6 +269,7 @@ function SelectMapModal({
width: image.width,
height: image.height,
mime: file.type,
owner: userId,
};
assets.push(fileAsset);