From ea2d98179cae73b46a5eeb4dfc5a1dc089027238 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 22 Jul 2024 10:52:20 -0400 Subject: [PATCH] Quick and dirty fix to spotlight reactivity --- src/grid/SpotlightExpandedLayout.tsx | 2 +- src/grid/SpotlightLandscapeLayout.tsx | 2 +- src/grid/SpotlightPortraitLayout.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/grid/SpotlightExpandedLayout.tsx b/src/grid/SpotlightExpandedLayout.tsx index b92460ee3..6480d6359 100644 --- a/src/grid/SpotlightExpandedLayout.tsx +++ b/src/grid/SpotlightExpandedLayout.tsx @@ -40,7 +40,7 @@ export const makeSpotlightExpandedLayout: CallLayout< const [generation] = useReactiveState( (prev) => (prev === undefined ? 0 : prev + 1), - [width, height], + [width, height, model.spotlight], ); const spotlightTileModel: SpotlightTileModel = useMemo( diff --git a/src/grid/SpotlightLandscapeLayout.tsx b/src/grid/SpotlightLandscapeLayout.tsx index e3ca1bf9a..fd219fa9d 100644 --- a/src/grid/SpotlightLandscapeLayout.tsx +++ b/src/grid/SpotlightLandscapeLayout.tsx @@ -48,7 +48,7 @@ export const makeSpotlightLandscapeLayout: CallLayout< ); const [generation] = useReactiveState( (prev) => (prev === undefined ? 0 : prev + 1), - [model.grid.length, width, height], + [model.grid.length, width, height, model.spotlight], ); return ( diff --git a/src/grid/SpotlightPortraitLayout.tsx b/src/grid/SpotlightPortraitLayout.tsx index 5b82ca627..6bd445242 100644 --- a/src/grid/SpotlightPortraitLayout.tsx +++ b/src/grid/SpotlightPortraitLayout.tsx @@ -59,7 +59,7 @@ export const makeSpotlightPortraitLayout: CallLayout< ); const [generation] = useReactiveState( (prev) => (prev === undefined ? 0 : prev + 1), - [model.grid.length, width, height], + [model.grid.length, width, height, model.spotlight], ); return (