Skip to content

Commit

Permalink
chore: move flags widget 2 widgets down (#7977)
Browse files Browse the repository at this point in the history
Moving flags 2 widgets down
  • Loading branch information
sjaanus authored Aug 23, 2024
1 parent 9af42b3 commit 08b0bfe
Showing 1 changed file with 50 additions and 32 deletions.
82 changes: 50 additions & 32 deletions frontend/src/component/insights/InsightsCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,6 @@ export const InsightsCharts: FC<IChartsProps> = ({
/>
</StyledChartContainer>
</StyledWidget>
<StyledWidget>
<StyledWidgetStats width={275}>
<WidgetTitle title='Flags' />
<FlagStats
count={flags.total}
flagsPerUser={getFlagsPerUser(flags, users)}
isLoading={loading}
/>
</StyledWidgetStats>
<StyledChartContainer>
<FlagsChart
flagTrends={flagTrends}
isLoading={loading}
/>
</StyledChartContainer>
</StyledWidget>
</>
}
elseShow={
Expand Down Expand Up @@ -192,22 +176,6 @@ export const InsightsCharts: FC<IChartsProps> = ({
/>
</StyledChartContainer>
</StyledWidget>
<StyledWidget>
<StyledWidgetStats width={275}>
<WidgetTitle title='Flags' />
<FlagStats
count={summary.total}
flagsPerUser={''}
isLoading={loading}
/>
</StyledWidgetStats>
<StyledChartContainer>
<FlagsProjectChart
projectFlagTrends={groupedProjectsData}
isLoading={loading}
/>
</StyledChartContainer>
</StyledWidget>
</>
}
/>
Expand Down Expand Up @@ -260,6 +228,56 @@ export const InsightsCharts: FC<IChartsProps> = ({
/>
</StyledChartContainer>
</StyledWidget>
</>
}
/>
<ConditionallyRender
condition={showAllProjects}
show={
<>
<StyledWidget>
<StyledWidgetStats width={275}>
<WidgetTitle title='Flags' />
<FlagStats
count={flags.total}
flagsPerUser={getFlagsPerUser(flags, users)}
isLoading={loading}
/>
</StyledWidgetStats>
<StyledChartContainer>
<FlagsChart
flagTrends={flagTrends}
isLoading={loading}
/>
</StyledChartContainer>
</StyledWidget>
</>
}
elseShow={
<>
<StyledWidget>
<StyledWidgetStats width={275}>
<WidgetTitle title='Flags' />
<FlagStats
count={summary.total}
flagsPerUser={''}
isLoading={loading}
/>
</StyledWidgetStats>
<StyledChartContainer>
<FlagsProjectChart
projectFlagTrends={groupedProjectsData}
isLoading={loading}
/>
</StyledChartContainer>
</StyledWidget>
</>
}
/>
<ConditionallyRender
condition={isEnterprise()}
show={
<>
<StyledWidget>
<StyledWidgetContent>
<WidgetTitle
Expand Down

0 comments on commit 08b0bfe

Please sign in to comment.