#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 content?: React.ReactNode; // if provided, overrides text rendering
style?: React.CSSProperties; style?: React.CSSProperties;
alignItems?: React.CSSProperties["alignItems"]; alignItems?: React.CSSProperties["alignItems"];
flexWrap?: React.CSSProperties["flexWrap"];
}; };
function detectUrls(text: string) { function detectUrls(text: string) {
@@ -64,6 +65,7 @@ export function InfoRow({
content, content,
style, style,
alignItems = "center", alignItems = "center",
flexWrap = "nowrap",
}: InfoRowProps) { }: InfoRowProps) {
return ( return (
<Box <Box
@@ -72,7 +74,7 @@ export function InfoRow({
alignItems, alignItems,
gap: 1, gap: 1,
marginBottom: 1, marginBottom: 1,
flexWrap: "wrap", flexWrap,
}} }}
> >
{icon} {icon}
@@ -133,9 +133,10 @@ export function EventPreviewDetails({
)} )}
{/* Resource */} {/* Resource */}
{resources && ( {resources?.length > 0 && (
<InfoRow <InfoRow
alignItems="flex-start" alignItems="flex-start"
flexWrap="wrap"
icon={ icon={
<Box sx={infoIconSx}> <Box sx={infoIconSx}>
<LayersOutlinedIcon /> <LayersOutlinedIcon />