You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Dock with 4 dock icons, the first 3 are usually visible however the fourth one is based on a condition:
<DockclassName='rounded-full border-none gap-5 backdrop-blur-3xl bg-black/50 p-2 animate-slide-up relative m-0'><DockIconclassName={cn(isDeletedAllRoofsEnaled&&"bg-white")}onClick={()=>{enableDeletedAllRoofs(!isDeletedAllRoofsEnaled)enablePanelSelection(false)setIsResizeRoofMenuVisible(false)}}><TooltipProviderdelayDuration={100}><Tooltip><TooltipTriggerasChild><DiffclassName={cn("relative rounded-full text-white",isDeletedAllRoofsEnaled&&"text-black")}/></TooltipTrigger><TooltipContent><p>Dächer hinzufügen oder entfernen</p></TooltipContent></Tooltip></TooltipProvider></DockIcon><DockIconclassName={cn(isSelectedPanelEnabled&&"bg-white")}onClick={()=>{enablePanelSelection(!isSelectedPanelEnabled)enableDeletedAllRoofs(false)setIsResizeRoofMenuVisible(false)}}><TooltipProviderdelayDuration={100}><Tooltip><TooltipTriggerasChild><MousePointerSquareclassName={cn("relative rounded-full text-white",isSelectedPanelEnabled&&"text-black")}/></TooltipTrigger><TooltipContent><p>Dächer hinzufügen oder entfernen</p></TooltipContent></Tooltip></TooltipProvider></DockIcon><DockIconclassName={cn(roofResizeMethod&&"bg-white")}onClick={()=>setIsResizeRoofMenuVisible(!isResizeRoofMenuVisible)}><TooltipProviderdelayDuration={100}><Tooltip><TooltipTriggerasChild><ScalingclassName={cn("relative rounded-full text-white",roofResizeMethod&&"text-black")}/></TooltipTrigger><TooltipContent><p>Dächer hinzufügen oder entfernen</p></TooltipContent></Tooltip></TooltipProvider></DockIcon>{newRoofs.length>0&&(<DockIconclassName={cn(newRoofs.length>0&&"bg-white")}onClick={()=>{installPvSystem(roofs)setNewRoofs([])}}><TooltipProviderdelayDuration={100}><Tooltip><TooltipTriggerasChild><UndoDotclassName={cn("relative rounded-full text-white",newRoofs.length>0&&"text-black")}/></TooltipTrigger><TooltipContent><p>Dächer hinzufügen oder entfernen</p></TooltipContent></Tooltip></TooltipProvider></DockIcon>)}</Dock>
As you see in the last one, it will be visible only when newRoofs.length>0 but it seems that the Dock component access to null which throws this error:
The text was updated successfully, but these errors were encountered:
Hi,
I have Dock with 4 dock icons, the first 3 are usually visible however the fourth one is based on a condition:
As you see in the last one, it will be visible only when
newRoofs.length>0
but it seems that the Dock component access to null which throws this error:The text was updated successfully, but these errors were encountered: