mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 09:48:44 +00:00
fix video aspect ratio icon not updating on gallery recreate
getCurrentAspectRatioIcon() was reading from aspectRatioList (useState), which is only updated on manual picker clicks, not external store writes. Reading aspectRatio from the store directly fixes the stale icon.
This commit is contained in:
1 parent
7eea797883
commit
810887e2cd
1 file changed
+1
-2
@@ -759,9 +759,8 @@ export const PromptBoxVideo = ({
|
||||
};
|
||||
|
||||
const getCurrentAspectRatioIcon = (): SizeIconOption => {
|
||||
const selectedLabel = aspectRatioList.find((item) => item.selected)?.label;
|
||||
const allOptions = selectedModel?.sizeOptions ?? DEFAULT_RESOLUTIONS;
|
||||
const match = allOptions.find((o) => o.textLabel === selectedLabel);
|
||||
const match = allOptions.find((o) => o.textLabel === aspectRatio);
|
||||
return match?.icon ?? SizeIconOption.Landscape;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user