1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00
This commit is contained in:
sjaanus 2025-07-29 16:27:27 +03:00
parent 2a3de76284
commit f9c0a542f4
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF
2 changed files with 4 additions and 10 deletions

View File

@ -44,7 +44,6 @@ interface ICreationArchiveChartProps {
creationArchiveTrends: GroupedDataByProject<
InstanceInsightsSchema['creationArchiveTrends']
>;
isAggregate?: boolean;
isLoading?: boolean;
}
@ -66,7 +65,6 @@ type RawWeekData = {
export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
creationArchiveTrends,
isAggregate,
isLoading,
}) => {
const creationArchiveData = useProjectChartData(creationArchiveTrends);
@ -188,9 +186,7 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
};
}, [creationArchiveData, theme]);
const aggregateOrProjectData = isAggregate
? aggregateHealthData
: creationArchiveData;
const aggregateOrProjectData = aggregateHealthData;
const notEnoughData = useMemo(
() =>
!isLoading &&
@ -200,14 +196,11 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
const data =
notEnoughData || isLoading ? placeholderData : aggregateOrProjectData;
const flagTypeNames = isAggregate
? (aggregateHealthData as any).flagTypeNames || []
: [];
const flagTypeNames = (aggregateHealthData as any).flagTypeNames || [];
return (
<>
<Chart
key={isAggregate ? 'aggregate' : 'project'}
type='bar'
data={data as any}
options={{

View File

@ -68,6 +68,8 @@ export const PerformanceInsights: FC = () => {
groupedCreationArchiveData,
} = useInsightsData(insights, projects);
console.log(groupedCreationArchiveData);
const { isEnterprise } = useUiConfig();
const lastUserTrend = userTrends[userTrends.length - 1];
const usersTotal = lastUserTrend?.total ?? 0;
@ -158,7 +160,6 @@ export const PerformanceInsights: FC = () => {
<StyledChartContainer>
<CreationArchiveChart
creationArchiveTrends={groupedCreationArchiveData}
isAggregate={showAllProjects}
isLoading={loading}
/>
</StyledChartContainer>