weewoo
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user