mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fixing imageAsset render
This commit is contained in:
parent
8f8c2f30ae
commit
0451e9e60d
@ -9,8 +9,8 @@ export function useImageAsset(topicId, asset) {
|
||||
frameWidth: 1,
|
||||
frameHeight: 1,
|
||||
imageRatio: 1,
|
||||
imageWidth: 128,
|
||||
imageHeight: 128,
|
||||
imageWidth: 1,
|
||||
imageHeight: 1,
|
||||
url: null,
|
||||
loaded: false,
|
||||
failed: false,
|
||||
@ -39,7 +39,7 @@ export function useImageAsset(topicId, asset) {
|
||||
updateState({ imageWidth: width, imageHeight: height });
|
||||
}
|
||||
}
|
||||
}, [state.frameWidth, state.frameHeight, state.imageRatio]);
|
||||
}, [state.frameWidth, state.frameHeight, state.imageRatio, state.loaded]);
|
||||
|
||||
useEffect(() => {
|
||||
updateState({ frameWidth: dimensions.width, frameHeight: dimensions.height });
|
||||
|
Loading…
Reference in New Issue
Block a user