#661 hide empty resource section in event detail
This commit is contained in:
@@ -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 />
|
||||||
|
|||||||
Reference in New Issue
Block a user