diff --git a/ui/src/components/DhcpLeaseCard.tsx b/ui/src/components/DhcpLeaseCard.tsx index 921520f..8c2a861 100644 --- a/ui/src/components/DhcpLeaseCard.tsx +++ b/ui/src/components/DhcpLeaseCard.tsx @@ -5,6 +5,8 @@ import { GridCard } from "@/components/Card"; import { LifeTimeLabel } from "@/routes/devices.$id.settings.network"; import { NetworkState } from "@/hooks/stores"; +import EmptyCard from "./EmptyCard"; + export default function DhcpLeaseCard({ networkState, setShowRenewLeaseConfirm, @@ -12,6 +14,17 @@ export default function DhcpLeaseCard({ networkState: NetworkState | null; setShowRenewLeaseConfirm: (show: boolean) => void; }) { + const isDhcpLeaseEmpty = Object.keys(networkState?.dhcp_lease || {}).length === 0; + + if (isDhcpLeaseEmpty) { + return ( + + ); + } + return (