+
}
+ >
{
+ e.stopPropagation();
+ e.preventDefault();
+ }}
>
-
-
-
-
-
-
-
-
-
-
- {peer.ip}
-
-
+ {isEmpty(peer.country_code) ? (
+
+ ) : (
+
+ )}
+
+
+
+ {peer.dns_label}
+
+
+
+ {peer.ip}
+
+
+
-
+
);
}
diff --git a/src/modules/peers/PeerAddressTooltipContent.tsx b/src/modules/peers/PeerAddressTooltipContent.tsx
new file mode 100644
index 0000000..912f767
--- /dev/null
+++ b/src/modules/peers/PeerAddressTooltipContent.tsx
@@ -0,0 +1,74 @@
+import { FlagIcon, GlobeIcon, MapPin, NetworkIcon } from "lucide-react";
+import * as React from "react";
+import { useMemo } from "react";
+import Skeleton from "react-loading-skeleton";
+import { useCountries } from "@/contexts/CountryProvider";
+import { Peer } from "@/interfaces/Peer";
+
+type Props = {
+ peer: Peer;
+};
+export const PeerAddressTooltipContent = ({ peer }: Props) => {
+ const { isLoading, getRegionByPeer } = useCountries();
+
+ const countryText = useMemo(() => {
+ return getRegionByPeer(peer);
+ }, [getRegionByPeer, peer]);
+
+ return (
+ {
+ e.stopPropagation();
+ e.preventDefault();
+ }}
+ >
+ }
+ label={"NetBird IP"}
+ value={peer.ip}
+ />
+ }
+ label={"Public IP"}
+ value={peer.connection_ip}
+ />
+ }
+ label={"Domain"}
+ value={peer.dns_label}
+ />
+ }
+ label={"Region"}
+ value={
+ isLoading && !countryText ? : countryText
+ }
+ />
+
+ );
+};
+
+const ListItem = ({
+ icon,
+ label,
+ value,
+}: {
+ icon: React.ReactNode;
+ label: string;
+ value: string | React.ReactNode;
+}) => {
+ return (
+