@allurereport/web-classic
Version:
The static files for Allure Classic Report
24 lines (19 loc) • 600 B
text/typescript
import { computed } from "@preact/signals";
import { fetchPieChartData, pieChartStore } from "@/stores/chart";
import { fetchTrendData, trendStore } from "@/stores/trend";
export const chartsStore = computed(() => {
const pieChartValue = pieChartStore.value;
const trendValue = trendStore.value;
return {
error: pieChartValue.error || trendValue.error,
loading: pieChartValue.loading || trendValue.loading,
data: {
pie: pieChartValue.data,
trends: trendValue.data,
},
};
});
export const fetchChartsData = () => {
fetchTrendData();
fetchPieChartData();
};