update
This commit is contained in:
@@ -2,8 +2,9 @@ import Dashboard from "@/components/dashboard/dashboard";
|
||||
import Content from "@/components/dashboard/content";
|
||||
import { fetchServer } from '@/lib/server-service';
|
||||
import { performance } from 'perf_hooks';
|
||||
import { Info } from 'lucide-react';
|
||||
import { Info, GitCommit } from 'lucide-react';
|
||||
import packageJson from '../../package.json';
|
||||
import { getGitCommitInfo } from '@/lib/git-utils';
|
||||
|
||||
// ✅ Corrected Vendor Type
|
||||
interface Vendor {
|
||||
@@ -28,14 +29,16 @@ interface OrderStats {
|
||||
export default async function DashboardPage() {
|
||||
const startTime = performance.now();
|
||||
|
||||
const [userResponse, orderStats] = await Promise.all([
|
||||
const [userResponse, orderStats, gitInfo] = await Promise.all([
|
||||
fetchServer<User>("/auth/me"),
|
||||
fetchServer<OrderStats>("/orders/stats"),
|
||||
getGitCommitInfo()
|
||||
]);
|
||||
|
||||
const endTime = performance.now();
|
||||
const generationTime = (endTime - startTime).toFixed(2);
|
||||
const panelVersion = packageJson.version;
|
||||
const commitHash = gitInfo.commitHash;
|
||||
|
||||
const vendor = userResponse.vendor;
|
||||
|
||||
@@ -46,6 +49,9 @@ export default async function DashboardPage() {
|
||||
<Info size={12} className="text-muted-foreground/80" />
|
||||
<span>v{panelVersion}</span>
|
||||
<span className="text-muted-foreground/50">|</span>
|
||||
<GitCommit size={12} className="text-muted-foreground/80" />
|
||||
<span>{commitHash}</span>
|
||||
<span className="text-muted-foreground/50">|</span>
|
||||
<span>Generated in {generationTime}ms</span>
|
||||
</div>
|
||||
</Dashboard>
|
||||
|
||||
Reference in New Issue
Block a user