This commit is contained in:
NotII
2025-04-07 19:25:24 +01:00
parent 7f7dd78818
commit 2f48ee38c2
102 changed files with 1825 additions and 761 deletions

View File

@@ -1,10 +1,10 @@
import Dashboard from "@/components/dashboard/dashboard";
import Content from "@/components/dashboard/content";
import { fetchServer } from '@/lib/server-service';
import { fetchServer } from '@/lib/api';
import { performance } from 'perf_hooks';
import { Info, GitCommit, User, Zap } from 'lucide-react';
import packageJson from '../../package.json';
import { getGitCommitInfo } from '@/lib/git-utils';
import { getGitInfo, getShortGitHash } from '@/lib/utils/git';
// ✅ Corrected Vendor Type
interface Vendor {
@@ -29,16 +29,18 @@ interface OrderStats {
export default async function DashboardPage() {
const startTime = performance.now();
const [userResponse, orderStats, gitInfo] = await Promise.all([
const [userResponse, orderStats] = await Promise.all([
fetchServer<User>("/auth/me"),
fetchServer<OrderStats>("/orders/stats"),
getGitCommitInfo()
fetchServer<OrderStats>("/orders/stats")
]);
// Get git info using the new utility
const gitInfo = getGitInfo();
const endTime = performance.now();
const generationTime = (endTime - startTime).toFixed(2);
const panelVersion = packageJson.version;
const commitHash = gitInfo.commitHash;
const commitHash = gitInfo.hash;
const vendor = userResponse.vendor;