Files
tm_panel/src/app/(home)/_components/dashboard/index.tsx
T
AmirReza Jamali 9202f9a271
continuous-integration/drone/push Build is passing
feat(dashboard): add scrape portals widget to dashboard
Surface AI pipeline portal sources on the dashboard instead of a standalone page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 10:22:58 +03:30

79 lines
2.2 KiB
TypeScript

"use client";
import { ClosingSoonCard } from "./closing-soon";
import { CountryDistribution } from "./country-distribution";
import { DashboardHero } from "./hero";
import { NoticeTypeBreakdown } from "./notice-types";
import { ScrapePortals } from "./portals";
import { RecentTenders } from "./recent-tenders";
import { StatisticsSection } from "./statistics-section";
import { TenderStatCards } from "./stat-cards";
import { TenderTrendsChart } from "./trends-chart";
import { useDashboardData } from "./use-dashboard-data";
export function TenderDashboard() {
const {
isPending,
total,
active,
closingSoon,
totalValue,
valueCurrency,
countries,
trend,
recent,
recentIsLoading,
portals,
portalsIsLoading,
} = useDashboardData();
return (
<div className="space-y-4 md:space-y-6 2xl:space-y-7.5">
<DashboardHero
total={total}
active={active}
closingSoon={closingSoon}
isLoading={isPending}
/>
<TenderStatCards
total={total}
active={active}
closingSoon={closingSoon}
totalValue={totalValue}
valueCurrency={valueCurrency}
trend={trend}
isLoading={isPending}
/>
<div className="grid grid-cols-12 gap-4 md:gap-6 2xl:gap-7.5">
<div className="col-span-12 xl:col-span-8">
<TenderTrendsChart data={trend} isLoading={isPending} />
</div>
<div className="col-span-12 xl:col-span-4">
<CountryDistribution countries={countries} isLoading={isPending} />
</div>
{/* <div className="col-span-12 xl:col-span-5">
<NoticeTypeBreakdown
noticeTypes={noticeTypes}
isLoading={isPending}
/>
</div> */}
{/* <div className="col-span-12 xl:col-span-7">
<ClosingSoonCard tenders={closingSoonList} isLoading={isPending} />
</div> */}
<div className="col-span-12 xl:col-span-8">
<RecentTenders tenders={recent} isLoading={recentIsLoading} />
</div>
<div className="col-span-12 xl:col-span-4">
<ScrapePortals portals={portals} isLoading={portalsIsLoading} />
</div>
</div>
<StatisticsSection />
</div>
);
}