Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/pages/views/components/SingleView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ const SingleView: React.FC<SingleViewProps> = ({ id }) => {
}
};

// Check if this view only aggregates other views (has sections but no content of its own)
const isAggregatorView =
viewResult.sections &&
viewResult.sections.length > 0 &&
!viewResult.panels &&
!viewResult.columns;

return (
<ViewLayout
title={title || name}
Expand Down Expand Up @@ -196,13 +203,16 @@ const SingleView: React.FC<SingleViewProps> = ({ id }) => {
<hr className="my-4 border-gray-200" />
)}

<div className="mt-2">
<ViewSection
key={`${namespace || "default"}:${name}`}
section={primaryViewSection}
hideVariables
/>
</div>
{/* Only show the primary ViewSection if this view has its own content */}
{!isAggregatorView && (
<div className="mt-2">
<ViewSection
key={`${namespace || "default"}:${name}`}
section={primaryViewSection}
hideVariables
/>
</div>
)}

{viewResult?.sections && viewResult.sections.length > 0 && (
<>
Expand Down
Loading