PageSourceSearch

https://app.contentpulse.io/assets/ConnectBigCommercePage-CPUCo0VX.js

js contentpulse.io collected 2026-10-02 00:37:38 UTC 3,821 bytes, 1 lines download raw bytes

1import{u as f,b as C,j as e}from"./vendor-query-BwGqmGsL.js";import{d as k,c as N,r as w,L as u}from"./vendor-react-B1KKw-FF.js";import{ao as v,a2 as y,u as B,G as g,d as i,g as L}from"./index-D3EnJqUf.js";import{u as E}from"./vendor-i18n-Co_UukXd.js";import"./vendor-axios-DEWho_Gc.js";async function M(s){const{data:a}=await v.post("/bigcommerce/connections/claim",{link:s});return a}function P(){const s=f();return C({mutationFn:a=>M(a),onSuccess:()=>{s.invalidateQueries({queryKey:y.websites.all})}})}function A(){const[s]=k(),a=N(),{t}=E("websites"),{user:c,tenant:n}=B(),o=P(),l=s.get("link")??"",j=s.get("store_name")??"",m=s.get("store")??"",p=s.get("expired")==="1",[d,x]=w.useState(""),h=j||(m?t("connectBigCommerce.storeHash",{hash:m}):t("connectBigCommerce.storeFallback")),b=async()=>{x("");try{const{data:r}=await o.mutateAsync(l);a(`/websites/${r.id}`,{replace:!0})}catch(r){x(L(r,t("connectBigCommerce.connectFailed")))}};return p||!l?e.jsx("div",{className:"mx-auto flex min-h-[60vh] max-w-lg items-center justify-center px-4",children:e.jsxs(g,{padding:"lg",children:[e.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white",children:t("connectBigCommerce.expiredTitle")}),e.jsx("p",{className:"mt-2 text-sm text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.expiredMessage",{store:h})}),e.jsx("div",{className:"mt-6",children:e.jsx(u,{to:"/websites",children:e.jsx(i,{variant:"secondary",children:t("connectBigCommerce.backToWebsites")})})})]})}):e.jsx("div",{className:"mx-auto flex min-h-[60vh] max-w-lg items-center justify-center px-4",children:e.jsxs(g,{padding:"lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-violet-500/10 text-violet-500",children:e.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round"})})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white",children:t("connectBigCommerce.title")}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.subtitle")})]})]}),e.jsxs("dl",{className:"mt-6 space-y-3 rounded-xl border border-slate-200 bg-white/50 p-4 text-sm dark:border-white/10 dark:bg-white/[0.03]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("dt",{className:"text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.storeLabel")}),e.jsx("dd",{className:"font-medium text-slate-900 dark:text-white",children:h})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("dt",{className:"text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.accountLabel")}),e.jsx("dd",{className:"truncate font-medium text-slate-900 dark:text-white",children:c==null?void 0:c.email})]}),(n==null?void 0:n.name)&&e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("dt",{className:"text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.workspaceLabel")}),e.jsx("dd",{className:"font-medium text-slate-900 dark:text-white",children:n.name})]})]}),e.jsx("p",{className:"mt-4 text-xs text-slate-500 dark:text-slate-400",children:t("connectBigCommerce.note")}),d&&e.jsx("div",{className:"mt-4 rounded-lg border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-sm text-rose-500 dark:text-rose-400",children:d}),e.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[e.jsx(i,{onClick:b,loading:o.isPending,children:t("connectBigCommerce.connect")}),e.jsx(u,{to:"/websites",children:e.jsx(i,{variant:"ghost",type:"button",children:t("shared.cancel")})})]})]})})}export{A as default};

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.