Skip to content

Commit a519483

Browse files
joshistoastpsychedelicious
authored andcommitted
refactor(ui): ♻️ memoize merged styles, simplify data attribute conditional
1 parent 75c9160 commit a519483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/frontend/web/src/common/components/FocusRegionWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const FocusRegionWrapper = memo(
4343
<Box
4444
ref={ref}
4545
tabIndex={-1}
46-
sx={{ ...FOCUS_REGION_STYLES, ...sx }}
47-
data-highlighted={isHighlighted ? true : undefined}
46+
sx={useMemo(() => ({ ...FOCUS_REGION_STYLES, ...sx }), [sx])}
47+
data-highlighted={isHighlighted}
4848
{...boxProps}
4949
>
5050
{children}

0 commit comments

Comments
 (0)