= ({ icon }) => {
if (!icon) {
return null;
}
if (typeof icon === "object") {
- return icon;
+ // eslint-disable-next-line react/jsx-no-useless-fragment
+ return <>{icon}>;
} else if (typeof icon === "string") {
- return ;
+ return ;
}
+ return null;
};
const StatusInfoEntry = ({
@@ -46,14 +52,14 @@ const StatusInfoEntry = ({
to={statusInfo.url}
target={target || ""}
>
- {statusInfo.icon && renderIcon(statusInfo.icon)}
+ {statusInfo.icon && }
);
} else {
return (
- {statusInfo.icon && renderIcon(statusInfo.icon)}
+ {statusInfo.icon && }
);
@@ -74,7 +80,7 @@ export function StatusLine({
className={clsx("flex flex-row items-center space-x-1", className)}
{...rest}
>
- {icon && renderIcon(icon)}
+ {icon && }
{url && (
{
+ const allProperties = topology?.properties || [];
+ const properties = allProperties.filter((i) => !i.headline);
+
+ const heading = allProperties.filter(
+ (i) => i.headline && (!!i.value || !!i.text || !!i.url)
+ );
+
+ const hasNoneHeadlineProperties =
+ properties.filter(
+ (i) => !i.headline && i.type !== "hidden" && (i.text || i.value)
+ ).length > 0;
+
+ return { heading, properties, hasNoneHeadlineProperties };
+ }, [topology?.properties]);
+
if (topology == null) {
return ;
}
- const allProperties = topology.properties || [];
- const properties = allProperties.filter((i) => !i.headline);
-
- const heading = allProperties.filter(
- (i) => i.headline && (!!i.value || !!i.text || !!i.url)
- );
-
return (
{canShowChildHealth() && (
diff --git a/src/components/Topology/TopologyCard/Utils/FormatProperties.tsx b/src/components/Topology/TopologyCard/Utils/FormatProperties.tsx
index 6dd023cd9..9bfbbe138 100644
--- a/src/components/Topology/TopologyCard/Utils/FormatProperties.tsx
+++ b/src/components/Topology/TopologyCard/Utils/FormatProperties.tsx
@@ -14,7 +14,6 @@ type FormatPropertyProps = {
};
export function FormatPropertyURL({ property }: FormatPropertyProps) {
- console.log("property", property);
if (property == null) {
return null;
}
diff --git a/src/ui/CustomScroll/index.tsx b/src/ui/CustomScroll/index.tsx
index 607007411..feaa0cbcd 100644
--- a/src/ui/CustomScroll/index.tsx
+++ b/src/ui/CustomScroll/index.tsx
@@ -53,7 +53,7 @@ export const CustomScroll = ({
setHasScroll(true);
}}
className={clsx(
- "bottom-0 m-auto w-full hover:underline",
+ "bottom-0 col-span-2 m-auto w-full hover:underline",
showMoreClass
)}
>