fix race where camera change effect sometimes was called after layout building (#11656)

This commit is contained in:
Josh Hawkins 2024-05-30 15:17:00 -05:00 committed by GitHub
parent 35946d332d
commit 8c325801ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,7 +337,10 @@ export default function DraggableGridLayout({
return (
<>
<Toaster position="top-center" closeButton={true} />
{!isGridLayoutLoaded || !currentGridLayout ? (
{!isGridLayoutLoaded ||
!currentGridLayout ||
!isEqual(cameras, currentCameras) ||
includeBirdseye !== currentIncludeBirdseye ? (
<div className="mt-2 grid grid-cols-2 gap-2 px-2 md:gap-4 xl:grid-cols-3 3xl:grid-cols-4">
{includeBirdseye && birdseyeConfig?.enabled && (
<Skeleton className="size-full rounded-lg md:rounded-2xl" />