Revert "️ perf: Defer Visactor chart libs to dashboard; minimize home bundle"

This reverts commit b67a42e0a8.
This commit is contained in:
t0ng7u
2025-08-17 10:49:09 +08:00
parent 3749be3e09
commit a6ad49dba0
6 changed files with 46 additions and 60 deletions

View File

@@ -17,12 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import React, { Suspense } from 'react';
import React from 'react';
import { Card, Avatar, Skeleton } from '@douyinfe/semi-ui';
const LazyVChart = React.lazy(() =>
import('@visactor/react-vchart').then(m => ({ default: m.VChart }))
);
import { VChart } from '@visactor/react-vchart';
const StatsCards = ({
groupedStatsData,
@@ -77,12 +74,10 @@ const StatsCards = ({
</div>
{(loading || (item.trendData && item.trendData.length > 0)) && (
<div className="w-24 h-10">
<Suspense fallback={null}>
<LazyVChart
spec={getTrendSpec(item.trendData, item.trendColor)}
option={CHART_CONFIG}
/>
</Suspense>
<VChart
spec={getTrendSpec(item.trendData, item.trendColor)}
option={CHART_CONFIG}
/>
</div>
)}
</div>