Quick and dirty fix to spotlight reactivity

This commit is contained in:
Robin 2024-07-22 10:52:20 -04:00
parent 58f274eabf
commit ea2d98179c
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ export const makeSpotlightExpandedLayout: CallLayout<
const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[width, height],
[width, height, model.spotlight],
);
const spotlightTileModel: SpotlightTileModel = useMemo(

View File

@ -48,7 +48,7 @@ export const makeSpotlightLandscapeLayout: CallLayout<
);
const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[model.grid.length, width, height],
[model.grid.length, width, height, model.spotlight],
);
return (

View File

@ -59,7 +59,7 @@ export const makeSpotlightPortraitLayout: CallLayout<
);
const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[model.grid.length, width, height],
[model.grid.length, width, height, model.spotlight],
);
return (