Skip to content

Commit ed4ca6d

Browse files
committed
Fixing spacing between sections on the Gantt Page
1 parent 6affade commit ed4ca6d

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/frontend/src/pages/GanttPage/GanttChart/GanttChartCollectionSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const GanttChartCollectionSection = <E, T>({
7070

7171
const ignoreBool = () => false;
7272

73-
return (
73+
return collection.tasks.length > 0 ? (
7474
<Box sx={collectionSectionBackgroundStyle}>
7575
<Box sx={collectionDescriptionContainerStyle}>
7676
<Typography variant="h6" fontWeight={400}>
@@ -108,7 +108,7 @@ const GanttChartCollectionSection = <E, T>({
108108
/>
109109
</Box>
110110
</Box>
111-
);
111+
) : null;
112112
};
113113

114114
export default GanttChartCollectionSection;

src/frontend/src/pages/GanttPage/GanttChart/GanttChartSection.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const GanttChartSection = <T,>({
6363
setCurrentTooltipOptions(undefined);
6464
};
6565

66-
return tasks.length > 0 ? (
66+
return (
6767
<Box sx={{ width: 'fit-content' }}>
6868
<Box sx={{ mt: '1rem', width: 'fit-content' }}>
6969
{tasks.map((task) => {
@@ -100,8 +100,6 @@ const GanttChartSection = <T,>({
100100
/>
101101
)}
102102
</Box>
103-
) : (
104-
<Typography sx={{ marginTop: 5 }}>No Projects to Display</Typography>
105103
);
106104
};
107105

src/frontend/src/pages/GanttPage/ProjectGanttChart/GanttChartFilters.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,5 @@ const GanttChartFilters = ({
179179
</Box>
180180
);
181181
};
182+
182183
export default GanttChartFilters;

0 commit comments

Comments
 (0)