Quick and dirty fix to spotlight reactivity
This commit is contained in:
@@ -40,7 +40,7 @@ export const makeSpotlightExpandedLayout: CallLayout<
|
|||||||
|
|
||||||
const [generation] = useReactiveState<number>(
|
const [generation] = useReactiveState<number>(
|
||||||
(prev) => (prev === undefined ? 0 : prev + 1),
|
(prev) => (prev === undefined ? 0 : prev + 1),
|
||||||
[width, height],
|
[width, height, model.spotlight],
|
||||||
);
|
);
|
||||||
|
|
||||||
const spotlightTileModel: SpotlightTileModel = useMemo(
|
const spotlightTileModel: SpotlightTileModel = useMemo(
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const makeSpotlightLandscapeLayout: CallLayout<
|
|||||||
);
|
);
|
||||||
const [generation] = useReactiveState<number>(
|
const [generation] = useReactiveState<number>(
|
||||||
(prev) => (prev === undefined ? 0 : prev + 1),
|
(prev) => (prev === undefined ? 0 : prev + 1),
|
||||||
[model.grid.length, width, height],
|
[model.grid.length, width, height, model.spotlight],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export const makeSpotlightPortraitLayout: CallLayout<
|
|||||||
);
|
);
|
||||||
const [generation] = useReactiveState<number>(
|
const [generation] = useReactiveState<number>(
|
||||||
(prev) => (prev === undefined ? 0 : prev + 1),
|
(prev) => (prev === undefined ? 0 : prev + 1),
|
||||||
[model.grid.length, width, height],
|
[model.grid.length, width, height, model.spotlight],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user