PageSourceSearch

https://nts-ecommerce.vercel.app/_next/static/chunks/345.f016e1a1edc34ba1.js

js nts-ecommerce.vercel.app collected 2026-10-03 07:25:32 UTC 5,997 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[345],{20345:(e,s,l)=>{l.r(s),l.d(s,{default:()=>o});var a=l(95155),t=l(12115);let i=(0,l(71847).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var r=l(15239),d=l(3998),n=l(14418),c=l(12768);let o=()=>{let e=(0,n.j)(),{reviews:s,reviewsLoading:l,reviewsError:o,stats:m}=(0,n.G)(e=>e.home),[x,h]=(0,t.useState)(!1);(0,t.useEffect)(()=>{e((0,c.MB)()),e((0,c.YK)())},[e]);let u=(0,t.useMemo)(()=>x?s:s.slice(0,4),[s,x]);(0,t.useCallback)(e=>{if(!e)return"N/A";let s=e.split(" ").filter(Boolean);return s.length&&s.map(e=>{var s,l;return null!=(l=null==(s=e[0])?void 0:s.toUpperCase())?l:""}).join("").slice(0,2)||"N/A"},[]);let p=(0,t.useCallback)(()=>{window.open("https://www.trustpilot.com/review/newtownspares.com","_blank")},[]);return(0,a.jsxs)("section",{id:"reviews",className:"w-full max-w-[1719px] flex flex-col gap-8 ",children:[(0,a.jsx)("header",{className:"mb-8",children:(0,a.jsx)("h2",{className:"h1-secondary-medium ",children:"Reviews"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,a.jsxs)("aside",{className:"rounded-lg p-6 flex flex-col items-center lg:items-start",children:[(0,a.jsxs)("div",{className:"mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-2 mb-2",children:[(0,a.jsx)("span",{className:"text-green-600 font-semibold text-3xl",children:"★"}),(0,a.jsx)("span",{className:"text-black font-semibold text-3xl",children:"Trustpilot"})]}),(0,a.jsxs)("p",{className:"flex items-center justify-center text-2xl font-semibold",children:[(null==m?void 0:m.rating)||"4.5",(0,a.jsx)("span",{className:"flex ml-4 text-[#FFA439]",children:[void 0,void 0,void 0,void 0,void 0].map((e,s)=>{let l=parseFloat((null==m?void 0:m.rating)||"4.5");return(0,a.jsx)(i,{className:`w-6 h-6 ${s<Math.floor(l)?"fill-[#FFA439]":"fill-muted"}`},s)})})]}),(0,a.jsxs)("p",{className:"h6-regular !text-muted-foreground mb-4",children:["from ",(null==m?void 0:m.count)||"134"," reviews"]})]}),(0,a.jsx)("ul",{className:"w-full space-y-2",children:[5,4,3,2,1].map((e,s)=>(0,a.jsxs)("li",{className:"flex items-center text-sm",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1 font-medium ",children:[e,".0",(0,a.jsx)(i,{className:"w-6 h-6 fill-[#FFA439] text-[#FFA439]"})]}),(0,a.jsx)("div",{className:"flex-1 mx-2 h-2 bg-gray-200 rounded-full",children:(0,a.jsx)("div",{className:"h-2 bg-black rounded-full",style:{width:`${[100,34,4,2,0][s]}%`}})}),(0,a.jsx)("span",{className:"w-6 text-gray-600",children:[100,34,4,2,0][s]})]},e))}),(0,a.jsx)("button",{className:"!mt-6 btn-outline-primary !text-[18px] !font-medium !px-10 !py-4 mx-auto",children:"Write a review"})]}),(0,a.jsxs)("div",{className:"lg:col-span-2 relative",children:[l?(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:Array.from({length:4}).map((e,s)=>(0,a.jsxs)("div",{className:"border rounded-lg p-5 bg-white shadow-xs animate-pulse space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between pb-2 border-b",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-200"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"h-4 w-28 rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-gray-100"})]})]}),(0,a.jsx)("div",{className:"h-4 w-24 rounded bg-gray-200"})]}),(0,a.jsx)("div",{className:"h-24 rounded bg-gray-100"})]},s))}):o?(0,a.jsxs)("div",{className:"border rounded-lg p-10 text-center bg-white shadow-xs flex flex-col items-center gap-4",children:[(0,a.jsx)("p",{className:"h5-regular text-red-600",children:o}),(0,a.jsx)(d.$,{variant:"outline",className:"!px-6 !py-3 !text-base",onClick:()=>e((0,c.MB)()),children:"Retry"})]}):0===u.length?(0,a.jsx)("div",{className:"border rounded-lg p-10 text-center bg-white shadow-xs",children:(0,a.jsx)("p",{className:"h5-regular text-gray-600",children:"No reviews available for this product yet."})}):(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 transition-all duration-700",children:u.slice(0,8).map((e,s)=>(0,a.jsxs)("article",{className:"border rounded-lg p-5 bg-white shadow-xs transition-all duration-500",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between mb-3 pb-2 border-b",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h5",{className:"text-[20px] font-medium",children:null==e?void 0:e.reviewer}),(0,a.jsx)("time",{dateTime:null==e?void 0:e.dateOfExperience,className:"h5-20px-medium",itemProp:"datePublished",children:null==e?void 0:e.dateOfExperience})]})}),(null==e?void 0:e.stars)?(0,a.jsx)(r.default,{src:e.stars,alt:"Rating",width:100,height:24,className:"h-6 w-auto object-contain",unoptimized:!0}):(0,a.jsx)("div",{className:"flex space-x-1 text-[#FFA439]",children:[void 0,void 0,void 0,void 0,void 0].map((e,s)=>(0,a.jsx)(i,{className:"w-6 h-6 fill-[#FFA439]"},s))})]}),(0,a.jsx)("p",{className:"h5-20px-regular",itemProp:"reviewBody",children:(null==e?void 0:e.reviewContent)?null==e?void 0:e.reviewContent:"No review content"})]},s))}),!x&&!l&&!o&&s.length>u.length&&(0,a.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-96 pointer-events-none bg-gradient-to-t from-white to-transparent roun
1ded-b-lg z-10"})]})]}),!x&&!l&&!o&&s.length>u.length&&(0,a.jsx)("div",{className:"text-center mt-8",children:(0,a.jsx)(d.$,{variant:"link",className:"text-lg text-red-600 font-medium hover:underline",onClick:p,children:"See all reviews ↓"})})]})}}}]);

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.