PageSourceSearch

https://order.nbcb.com.sg/chunks/chunk.lteg8RYt.js

js nbcb.com.sg collected 2026-10-07 19:10:16 UTC 1,920 bytes, 2 lines download raw bytes

1import{H as h,u as T,r as a,C as y,k as S,m as x,j as o,c as A,S as E,J as I,K as w,N}from"../assets/index-9rE7GCje.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[s]="49a5f890-10d9-49c8-adcc-30983ce2ba63",c._sentryDebugIdIdentifier="sentry-dbid-49a5f890-10d9-49c8-adcc-30983ce2ba63")}catch{}})();const d={ACTIVE:"active",PAST:"past"};function k(){const c=h(),{t:s}=T(),[l,f]=a.useState(d.ACTIVE),[C,p]=a.useState([]),[b,g]=a.useState([]),[v,u]=a.useState(null),{pathConfig:r}=a.useContext(y),i=l===d.ACTIVE,{loading:P,error:t,data:e}=S(N,{context:{graph:"diners"}});a.useEffect(()=>{t!=null&&t.message&&x.error(t.message)},[t==null?void 0:t.message]),a.useEffect(()=>{e!=null&&e.promotions&&(p(e==null?void 0:e.promotions.filter(n=>n.active&&n.remainingClaimsCount>0&&!n.fullyRedeemed)),g(e==null?void 0:e.promotions.filter(n=>!n.active||n.unreleasedClaimsCount>0||n.fullyRedeemed)))},[e==null?void 0:e.promotions]);function m(){return i?C:b}return o("div",{children:A(E,{spinning:P,children:[o("h2",{className:"hidden mb-6 text-2xl font-display sm:block",children:s("account.promoCodes.header")}),o("div",{className:"mb-6",children:s("account.promoCodes.description")}),o("h3",{className:"mb-6 text-base font-bold",children:s(`account.promoCodes.${i?"activeHeader":"pastHeader"}`)}),o(I,{promo:v,closeModal:()=>u(null),goToMenu:()=>c(r==null?void 0:r.menuPath),centered:!0}),m().length>0?o(w,{promoCodes:m(),isActiveSelectedTab:i,setSelectedPromo:u}):o("div",{children:s(`account.promoCodes.${i?"noActive":"noPast"}`)}),o("a",{className:"inline-block mt-6 underline text-default hover:text-default hover:underline",onClick:()=>{f(i?d.PAST:d.ACTIVE)},children:s(`account.promoCodes.${i?"viewPast":"viewActive"}`)})]})})}export{k as default};
2//# sourceMappingURL=chunk.lteg8RYt.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.