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:
Tanish Manku committed 2026-04-16 09:57:13 -07:00
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;
};