#661 hide empty resource section in event detail

This commit is contained in:
lethemanh
2026-03-18 16:24:04 +07:00
parent e665ea4a79
commit ed03174934
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ type InfoRowProps = {
content?: React.ReactNode; // if provided, overrides text rendering
style?: React.CSSProperties;
alignItems?: React.CSSProperties["alignItems"];
flexWrap?: React.CSSProperties["flexWrap"];
};
function detectUrls(text: string) {
@@ -64,6 +65,7 @@ export function InfoRow({
content,
style,
alignItems = "center",
flexWrap = "nowrap",
}: InfoRowProps) {
return (
<Box
@@ -72,7 +74,7 @@ export function InfoRow({
alignItems,
gap: 1,
marginBottom: 1,
flexWrap: "wrap",
flexWrap,
}}
>
{icon}
@@ -133,9 +133,10 @@ export function EventPreviewDetails({
)}
{/* Resource */}
{resources && (
{resources?.length > 0 && (
<InfoRow
alignItems="flex-start"
flexWrap="wrap"
icon={
<Box sx={infoIconSx}>
<LayersOutlinedIcon />