Remove donation statistics from the homepage
Removes the `useGetStats` hook, related UI components, and associated stats data display from the home page component (`artifacts/ehsan-poc/src/pages/home.tsx`). Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1fa9329f-0cec-4a2f-80e8-e26dbae3142e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 9d9cb891-ca9e-40e3-9586-e59346eeb92a Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/4d696b13-86f2-4c9d-be0d-95b293430047/1fa9329f-0cec-4a2f-80e8-e26dbae3142e/9BsJG31 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useLanguage } from "../contexts/LanguageContext";
|
||||
import { useGetStats, useListPublishedRequests } from "@workspace/api-client-react";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { useListPublishedRequests } from "@workspace/api-client-react";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { OpportunityCard } from "../components/OpportunityCard";
|
||||
import { Reveal } from "../components/Reveal";
|
||||
import { Riyal } from "@/components/Riyal";
|
||||
import { Link } from "wouter";
|
||||
import { Search, Pause, Play } from "lucide-react";
|
||||
import zakatBanner from "@assets/zakatbanarWEB_1780682994527.png";
|
||||
@@ -43,7 +42,6 @@ function Ornament({ className = "" }: { className?: string }) {
|
||||
|
||||
export default function Home() {
|
||||
const { t } = useLanguage();
|
||||
const { data: stats, isLoading: statsLoading } = useGetStats();
|
||||
const { data: published, isLoading: pubLoading } = useListPublishedRequests();
|
||||
const [query, setQuery] = useState("");
|
||||
const [slide, setSlide] = useState(0);
|
||||
@@ -150,45 +148,6 @@ export default function Home() {
|
||||
</section>
|
||||
|
||||
<div className="container mx-auto px-4 py-12">
|
||||
{/* Stats */}
|
||||
{statsLoading ? (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-16">
|
||||
<Skeleton className="h-32 w-full" />
|
||||
<Skeleton className="h-32 w-full" />
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-16">
|
||||
<Reveal className="h-full">
|
||||
<Card className="h-full">
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium text-muted-foreground">
|
||||
{t.home.totalCollected}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-4xl font-bold text-primary inline-flex items-center gap-2">
|
||||
{stats?.totalCollected?.toLocaleString() || 0} <Riyal />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Reveal>
|
||||
<Reveal delay={0.1} className="h-full">
|
||||
<Card className="h-full">
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium text-muted-foreground">
|
||||
{t.home.totalClosed}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-4xl font-bold text-foreground">
|
||||
{stats?.totalClosed || 0}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Reveal>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Featured Opportunities */}
|
||||
<section className="mb-16">
|
||||
{/* Search */}
|
||||
|
||||
Reference in New Issue
Block a user