PageSourceSearch

https://www.bagchee.com/static/js/8589.4fbe4cee.chunk.js

js bagchee.com collected 2026-10-02 11:15:53 UTC 3,256 bytes, 3 lines download raw bytes

1/*! For license information please see 8589.4fbe4cee.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[8589],{2024(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},8589(e,t,a){a.r(t),a.d(t,{default:()=>l});var s=a(5043),r=a(7874),d=a(3046),i=a(2024);const c=(0,a(7784).A)("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]);var n=a(579);const l=()=>{const e=(0,r.Zp)(),[t,a]=(0,s.useState)([]),[l,o]=(0,s.useState)(!0),x="https://www.bagchee.com/api";return(0,s.useEffect)(()=>{(async()=>{try{const e=await d.A.get("".concat(x,"/product-types/list"));e.data.status&&a(e.data.data)}catch(e){console.error("Error fetching product types:",e)}finally{o(!1)}})()},[x]),l?(0,n.jsx)("div",{className:"flex justify-center items-center h-screen bg-gray-50",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,n.jsx)(i.A,{size:40,className:"animate-spin text-primary"}),(0,n.jsx)("p",{className:"text-gray-500 font-bold text-sm",children:"Loading Dashboard..."})]})}):(0,n.jsxs)("div",{className:"bg-gray-50 min-h-screen p-6 md:p-10 font-body",children:[(0,n.jsx)("div",{className:"mb-10 flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:(0,n.jsxs)("div",{className:"text-center md:text-left",children:[(0,n.jsx)("h1",{className:"text-4xl md:text-5xl font-bold text-text-main font-display tracking-tight",children:"Hello, admin!"}),(0,n.jsx)("p",{className:"text-gray-500 mt-2",children:"Manage your product categories below."})]})}),t.length>0?(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 max-w-7xl",children:t.map(t=>(0,n.jsxs)("div",{onClick:()=>{const a=t.imageFolder||t.image_folder;a&&e("/admin/".concat(a))},className:"bg-white rounded-2xl p-6 flex items-center gap-6 shadow-[0_10px_30px_rgba(0,0,0,0.04)] border border-gray-100 hover:shadow-xl transition-all cursor-pointer group",children:[(0,n.jsx)("div",{className:"w-20 h-20 md:w-24 md:h-24 bg-primary rounded-2xl flex items-center justify-center text-white shadow-lg shadow-primary/30 group-hover:scale-105 transition-transform duration-300 shrink-0",children:(0,n.jsx)(c,{size:40})}),(0,n.jsxs)("div",{className:"overflow-hidden",children:[(0,n.jsx)("h3",{className:"text-lg md:text-xl font-bold text-text-muted font-montserrat tracking-wide group-hover:text-primary transition-colors uppercase truncate",children:t.name}),(0,n.jsx)("span",{className:"text-xs text-gray-400 font-medium bg-gray-100 px-2 py-1 rounded mt-1 inline-block",children:t.bagcheePrefix||t.bagchee_prefix||"N/A"})]})]},t.id||t._id))}):(0,n.jsxs)("div",{className:"text-center py-20 bg-white rounded-2xl border border-dashed border-gray-300",children:[(0,n.jsx)("p",{className:"text-gray-400 font-bold",children:"No product categories found."}),(0,n.jsx)("button",{onClick:()=>e("/admin/add-product-type"),className:"mt-4 text-primary hover:underline font-bold text-sm",children:"+ Add First Category"})]})]})}}}]);
3//# sourceMappingURL=8589.4fbe4cee.chunk.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.