PageSourceSearch

https://needshub.org/assets/page-5Fgfhu47.js

js needshub.org collected 2026-10-06 12:31:32 UTC 17,491 bytes, 8 lines download raw bytes

1import{r as o,s as k,j as e,L as m}from"./index-2DJFO5Rr.js";import{H as _,F as z}from"./Footer-DXy79AlQ.js";import{u as I}from"./useTranslation-DxIv8VeG.js";function q(){const{t}=I(),[x,g]=o.useState([]),[f,p]=o.useState(!0),[n,v]=o.useState(0),[d,j]=o.useState(0);o.useEffect(()=>{N()},[]);const N=async()=>{try{p(!0);const{data:a,error:l}=await k.from("order_items").select(`
2          id,
3          country_id,
4          category_id,
5          country:countries(name),
6          category:categories(name)
7        `).eq("status","completed").eq("public_display",!0);if(l)throw l;const r=new Map;a?.forEach(s=>{const i=s.country_id,w=s.country?.name||"Unknown",h=s.category?.name||"Other";r.has(i)||r.set(i,{country_id:i,country_name:w,completed_count:0,categories:[]});const c=r.get(i);c.completed_count++;const b=c.categories.find(y=>y.name===h);b?b.count++:c.categories.push({name:h,count:1})});const u=Array.from(r.values()).sort((s,i)=>i.completed_count-s.completed_count);g(u),v(a?.length||0),j(u.length)}catch(a){console.error("Error fetching impact data:",a)}finally{p(!1)}};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx(_,{}),e.jsxs("section",{className:"relative min-h-[60vh] flex items-center overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-900 via-teal-900 to-slate-900",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute top-20 left-20 w-96 h-96 bg-gradient-to-br from-teal-500/30 to-cyan-500/30 rounded-full blur-3xl animate-pulse"}),e.jsx("div",{className:"absolute bottom-20 right-20 w-96 h-96 bg-gradient-to-br from-emerald-500/30 to-teal-500/30 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}}),e.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-96 h-96 bg-gradient-to-br from-cyan-500/20 to-blue-500/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"4s"}})]}),e.jsx("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"linear-gradient(rgba(20, 184, 166, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 184, 166, 0.3) 1px, transparent 1px)",backgroundSize:"50px 50px"}})]}),e.jsx("div",{className:"relative max-w-7xl mx-auto px-6 py-24 w-full z-10",children:e.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-3 bg-white/10 backdrop-blur-md text-white px-6 py-3 rounded-full shadow-2xl mb-8 border border-white/20",children:[e.jsx("i",{className:"ri-line-chart-line text-lg"}),e.jsx("span",{className:"font-semibold text-sm uppercase tracking-wide",children:t("impact.impact.hero.badge")})]}),e.jsx("h1",{className:"text-6xl md:text-7xl font-bold text-white mb-6 leading-tight",children:t("impact.impact.hero.title")}),e.jsx("p",{className:"text-xl text-slate-200 leading-relaxed max-w-3xl mx-auto",children:t("impact.impact.hero.subtitle")})]})}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-white to-transparent"})]}),e.jsx("section",{className:"max-w-7xl mx-auto px-6 -mt-20 mb-24 relative z-20",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"group bg-white rounded-3xl shadow-2xl p-10 text-center hover:shadow-3xl transition-all duration-500 hover:-translate-y-3 border border-slate-100",children:[e.jsxs("div",{className:"relative mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-teal-500 to-cyan-500 rounded-2xl blur-xl opacity-30 group-hover:opacity-60 transition-opacity duration-500"}),e.jsx("div",{className:"relative w-20 h-20 bg-gradient-to-br from-teal-500 to-cyan-500 rounded-2xl flex items-center justify-center mx-auto shadow-xl group-hover:scale-110 group-hover:rotate-6 transition-all duration-500",children:e.jsx("i",{className:"ri-checkbox-circle-line text-4xl text-white"})})]}),e.jsx("div",{className:"text-5xl font-bold bg-gradient-to-r from-teal-600 to-cyan-600 bg-clip-text text-transparent mb-3",children:n>
70?n.toLocaleString():t("impact.impact.stats.ready")}),e.jsx("div",{className:"text-slate-600 font-semibold text-lg",children:n>0?t("impact.impact.stats.verified"):t("impact.impact.stats.infrastructure")})]}),e.jsxs("div",{className:"group bg-white rounded-3xl shadow-2xl p-10 text-center hover:shadow-3xl transition-all duration-500 hover:-translate-y-3 border border-slate-100",children:[e.jsxs("div",{className:"relative mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-2xl blur-xl opacity-30 group-hover:opacity-60 transition-opacity duration-500"}),e.jsx("div",{className:"relative w-20 h-20 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-2xl flex items-center justify-center mx-auto shadow-xl group-hover:scale-110 group-hover:rotate-6 transition-all duration-500",children:e.jsx("i",{className:"ri-map-pin-line text-4xl text-white"})})]}),e.jsx("div",{className:"text-5xl font-bold bg-gradient-to-r from-cyan-600 to-blue-600 bg-clip-text text-transparent mb-3",children:d>0?d:"6"}),e.jsx("div",{className:"text-slate-600 font-semibold text-lg",children:d>0?t("impact.impact.stats.activeRegions"):t("impact.impact.stats.priorityRegions")})]}),e.jsxs("div",{className:"group bg-white rounded-3xl shadow-2xl p-10 text-center hover:shadow-3xl transition-all duration-500 hover:-translate-y-3 border border-slate-100",children:[e.jsxs("div",{className:"relative mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl blur-xl opacity-30 group-hover:opacity-60 transition-opacity duration-500"}),e.jsx("div",{className:"relative w-20 h-20 bg-gradient-to-br from-emerald-500 to-teal-500 rounded-2xl flex items-center justify-center mx-auto shadow-xl group-hover:scale-110 group-hover:rotate-6 transition-all duration-500",children:e.jsx("i",{className:"ri-shield-check-line text-4xl text-white"})})]}),e.jsx("div",{className:"text-5xl font-bold bg-gradient-to-r from-emerald-600 to-teal-600 bg-clip-text text-transparent mb-3",children:"100%"}),e.jsx("div",{className:"text-slate-600 font-semibold text-lg",children:t("impact.impact.stats.documented")})]})]})}),e.jsxs("section",{className:"max-w-7xl mx-auto px-6 pb-24",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("div",{className:"inline-block bg-gradient-to-r from-teal-100 to-cyan-100 text-teal-700 px-6 py-3 rounded-full text-sm font-bold mb-6 uppercase tracking-wider",children:t("impact.impact.regions.badge")}),e.jsx("h2",{className:"text-5xl md:text-6xl font-bold text-slate-900 mb-6",children:t("impact.impact.regions.title")}),e.jsx("p",{className:"text-xl text-slate-600 max-w-3xl mx-auto leading-relaxed",children:t("impact.impact.regions.subtitle")})]}),f?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-20 h-20 border-4 border-teal-200 rounded-full"}),e.jsx("div",{className:"w-20 h-20 border-4 border-teal-600 rounded-full animate-spin border-t-transparent absolute top-0 left-0"})]})}):x.length===0?e.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 via-white to-teal-50 rounded-3xl shadow-2xl p-16 text-center border border-slate-200",children:[e.jsx("div",{className:"absolute inset-0 opacity-5",children:e.jsx("div",{className:"absolute top-0 left-0 w-full h-full",style:{backgroundImage:"radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.3) 0%, transparent 50%)"}})}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"relative mb-8 inl
7ine-block",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-teal-500 to-cyan-500 rounded-3xl blur-2xl opacity-30"}),e.jsx("div",{className:"relative w-32 h-32 bg-gradient-to-br from-teal-500 to-cyan-500 rounded-3xl flex items-center justify-center shadow-2xl",children:e.jsx("i",{className:"ri-rocket-line text-6xl text-white"})})]}),e.jsx("h3",{className:"text-4xl font-bold text-slate-900 mb-6",children:t("impact.impact.ready.title")}),e.jsx("p",{className:"text-lg text-slate-600 mb-12 max-w-3xl mx-auto leading-relaxed",children:t("impact.impact.ready.description")}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-6 max-w-5xl mx-auto",children:[{name:"Palestine",flag:"🇵🇸",color:"from-emerald-500 to-teal-500"},{name:"Syria",flag:"🇸🇾",color:"from-cyan-500 to-blue-500"},{name:"Ukraine",flag:"🇺🇦",color:"from-blue-500 to-indigo-500"},{name:"India",flag:"🇮🇳",color:"from-orange-500 to-amber-500"},{name:"Jordan",flag:"🇯🇴",color:"from-purple-500 to-pink-500"},{name:"Lebanon",flag:"🇱🇧",color:"from-rose-500 to-red-500"}].map((a,l)=>e.jsxs("div",{className:"group bg-white rounded-2xl p-6 text-center shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-2 border border-slate-200",children:[e.jsx("div",{className:"text-5xl mb-4 transform group-hover:scale-110 transition-transform duration-300",children:a.flag}),e.jsx("div",{className:"text-base font-bold text-slate-900 mb-2",children:a.name}),e.jsxs("div",{className:`inline-flex items-center gap-2 bg-gradient-to-r ${a.color} text-white px-3 py-1.5 rounded-full text-xs font-semibold shadow-md`,children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full animate-pulse"}),e.jsx("span",{children:t("impact.impact.ready.active")})]})]},l))})]})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:x.map(a=>e.jsxs("div",{className:"group bg-white rounded-3xl shadow-xl hover:shadow-2xl transition-all duration-500 overflow-hidden border border-slate-200 hover:border-teal-300 hover:-translate-y-3",children:[e.jsxs("div",{className:"relative bg-gradient-to-r from-teal-500 to-cyan-500 p-8 text-white overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"radial-gradient(circle at 2px 2px, white 1px, transparent 0)",backgroundSize:"24px 24px"}}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-3xl font-bold",children:a.country_name}),e.jsx("div",{className:"w-16 h-16 bg-white/20 rounded-2xl flex items-center justify-center backdrop-blur-sm group-hover:scale-110 transition-transform duration-300",children:e.jsx("i",{className:"ri-map-pin-fill text-3xl"})})]}),e.jsx("div",{className:"text-5xl font-bold mb-2",children:a.completed_count}),e.jsx("div",{className:"text-teal-100 text-sm font-semibold uppercase tracking-wide",children:t("impact.impact.regions.verified")})]})]}),e.jsxs("div",{className:"p-8 bg-gradient-to-br from-white to-slate-50",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-700 uppercase tracking-wider mb-6 flex items-center gap-2",children:[e.jsx("i",{className:"ri-folder-line text-teal-600 text-lg"}),t("impact.impact.regions.categories")]}),e.jsx("div",{className:"space-y-4",children:a.categories.map((l,r)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-700 font-semibold",children:l.name}),e.jsx("span",{className:"text-sm font-bold text-slate-900 bg-slate-100 px-3 py-1.5 rounded-full",children:l.count})]}),e.jsx("div",{className:"w-full h-3 bg-slate-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-teal-500 to-cyan-500 rounded-full transition-all duration-700 shadow-sm",style:{width:`${l.count/a.completed_count*100}%`}})})]},r))})]})]},a.country_id))}),e.jsx("div",{className:"text-center mt-16",children:e.jsxs(m,{to:"/impact/recent",className:"group inline-flex items-center gap-3 px-10 py-5 bg-gradient-to-r from-teal-600 to-cyan-600 text-white rounded-full font-bold text-lg hover:from-teal-700 hover:to-cyan-700 transition-all hover:scale-105 shadow-xl hover:shadow-2xl whitespace-nowrap",children:[e.jsx("span",{children:t("impact.impact.cta.viewRecent")}),e.jsx("i",{className:"ri-arrow-right-line text-2xl group-hover:translate-x-2 transition-transform duration-300"})]})})]}),e.jsxs("section",{className:"relative py-32 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-50 via-white to-teal-50",children:e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -left-40 w-96 h-96 bg-gradient-to-br from-teal-400/20 to-cyan-400/20 rounded-full blur-3xl animate-pulse"}),e.jsx("div",{className:"absolute top-1/2 -right-40 w-96 h-96 bg-gradient-to-br from-cyan-400/20 to-blue-400/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}}),e.jsx("div",{className:"absolute -bottom-40 left-1/3 w-96 h-96 bg-gradient-to-br from-emerald-400/20 to-teal-400/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"4s"}})]})}),e.jsxs("div",{className:"relative max-w-7xl mx-auto px-6 z-10",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("div",{className:"inline-block bg-gradient-to-r from-teal-100 to-cyan-100 text-teal-700 px-6 py-3 rounded-full text-sm font-bold mb-6 uppercase tracking-wider",children:t("impact.impact.documentation.badge")}),e.jsx("h2",{className:"text-5xl md:text-6xl font-bold text-slate-900 mb-6",children:t("impact.impact.documentation.title")}),e.jsx("p",{className:"text-xl text-slate-600 max-w-3xl mx-auto leading-relaxed",children:t("impact.impact.documentation.subtitle")})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:[{icon:"ri-camera-line",title:t("impact.impact.documentation.photo.title"),description:t("impact.impact.documentation.photo.description"),gradient:"from-teal-500 to-cyan-500",bgGradient:"from-teal-50 to-cyan-50"},{icon:"ri-file-text-line",title:t("impact.impact.documentation.reports.title"),description:t("impact.impact.documentation.reports.description"),gradient:"from-cyan-500 to-blue-500",bgGradient:"from-cyan-50 to-blue-50"},{icon:"ri-qr-code-line",title:t("impact.impact.documentation.qr.title"),description:t("impact.impact.documentation.qr.description"),gradient:"from-blue-500 to-indigo-500",bgGradient:"from-blue-50 to-indigo-50"},{icon:"ri-time-line",title:t("impact.impact.documentation.timeline.title"),description:t("impact.impact.documentation.timeline.description"),gradient:"from-indigo-500 to-purple-500",bgGradient:"from-indigo-50 to-purple-50"}].map((a,l)=>e.jsxs("div",{className:"group relative bg-white rounded-3xl p-8 shadow-xl hover:shadow-2xl transition-all duration-500 hover:-translate-y-3 text-center border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${a.bgGradient} opacity-0 group-hover:opacity-100 transition-opacity duration-500`}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"relative mb-6 inline-block",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${a.gradient} rounded-2xl blur-xl opacity-30 group-hover:opacity-60 transition-opacity duration-500`}),e.jsx("div",{className:`relative w-20 h-20 bg-gradient-to-br ${a.gradient} rounded-2xl flex items-center justify-center shadow-xl group-hover:scale-110 group-hover:rotate-6 transition-all duration-500`,children:e.jsx("i",{className:`${a.icon} text-4xl text-white`})})]}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-4 group-hover:text-teal-600 transition-colors duration-300",children:a.title}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a.description})]})]},l))})]})]}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-900 via-teal-900 to-slate-900 py-24",children:[e.jsx("div",{className:"absolute inset-0 opacity-20",children:e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(20, 184, 166, 0.5) 1px, transparent 0)",backgroundSize:"32px 32px"}})}),e.jsxs("div",{className:"relative max-w-7xl mx-auto px-6 text-center z-10",children:[e.jsx("h2",{className:"text-5xl md:text-6xl font-bold text-white mb-6 leading-tight",children:t("impact.impact.cta.title")}),e.jsx("p",{className:"text-xl text-slate-200 max-w-3xl mx-auto leading-relaxed mb-10",children:t("impact.impact.cta.subtitle")}),e.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[e.jsxs(m,{to:"/countries",className:"group inline-flex items-center gap-3 bg-gradient-to-r from-teal-500 to-emerald-500 text-white px-10 py-5 rounded-full font-bold text-lg hover:from-teal-600 hover:to-emerald-600 transition-all duration-300 hover:scale-105 hover:shadow-2xl whitespace-nowrap",children:[e.jsx("span",{children:t("impact.impact.cta.browse")}),e.jsx("i",{className:"ri-arrow-right-line text-2xl group-hover:translate-x-2 transition-transform duration-300"})]}),e.jsxs(m,{to:"/track-order",className:"inline-flex items-center gap-3 bg-white/10 backdrop-blur-sm text-white px-10 py-5 rounded-full font-bold text-lg hover:bg-white/20 transition-all duration-300 border-2 border-white/30 whitespace-nowrap",children:[e.jsx("i",{className:"ri-search-line text-2xl"}),e.jsx("span",{children:t("impact.impact.cta.track")})]})]})]})]}),e.jsx(z,{})]})}
7export{q as default};
8//# sourceMappingURL=page-5Fgfhu47.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.