PageSourceSearch

https://www.growlytics.app/assets/NetworkExchange-w1dze2hk.js

js growlytics.app collected 2026-10-02 01:15:12 UTC 17,060 bytes, 1 lines download raw bytes

1import{r as a,j as e}from"./vendor-libs-DqTTukLt.js";import{ab as j,a as y,C as w,G as v,a8 as N}from"./index-DnZkLQpb.js";import{b as _,t as E}from"./backlinkService-BdhUJ9si.js";import{P}from"./PageSkeleton-CMJ0Wc2K.js";import{A as C}from"./ActionGuide-C18CM0sd.js";import"./vendor-heavy-BYAivpjp.js";const q=()=>{const{selectedProject:n}=j(),{addToast:l}=y(),[t,c]=a.useState(null),[p,o]=a.useState(!0),[k,x]=a.useState(!1),[S,B]=a.useState(!1),[T,R]=a.useState(100),[i,u]=a.useState("received"),[A,G]=a.useState(!0),[b,m]=a.useState(!1),[D,L]=a.useState(!1),h=async()=>{if(n){o(!0);try{const r=await _(n.id);r.data.success&&c(r.data.data)}catch{l("Failed to load network exchange data.","error")}finally{o(!1)}}};a.useEffect(()=>{h()},[n]),a.useEffect(()=>{const r=()=>{h()};return window.addEventListener("growlytics:refresh-data",r),()=>window.removeEventListener("growlytics:refresh-data",r)},[n]);const g=async()=>{if(!(!n||!t)){x(!0);try{const r=await E(n.id);r.data.success&&(c(s=>s?{...s,get_backlinks_enabled:r.data.get_backlinks_enabled}:null),l(r.data.message,"success"))}catch{l("Failed to toggle network exchange participation.","error")}finally{x(!1)}}};if(p||!t)return e.jsx(P,{type:"backlinks"});const d=b?t.received_links.filter(r=>r.is_verified):t.received_links,f=d.length;return e.jsxs("div",{className:"bg-white dark:bg-neutral-900 flex flex-col relative p-6 md:p-8 space-y-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 border-b border-neutral-100 dark:border-neutral-800 pb-5",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-white tracking-tight flex items-center gap-2",children:["Backlink Exchange",e.jsx("button",{className:"px-2.5 py-1 text-xs font-semibold bg-neutral-50 dark:bg-neutral-800 hover:bg-neutral-100 dark:hover:bg-neutral-700 text-neutral-600 dar
1k:text-neutral-300 rounded border border-neutral-200 dark:border-neutral-700 transition-colors",children:"How It Works"})]}),e.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 font-medium mt-1",children:"Track all the backlinks your website has earned through the Growlytics backlink exchange network."})]}),e.jsxs("div",{className:"bg-white dark:bg-neutral-850 border border-neutral-200 dark:border-neutral-850 rounded px-4 py-3 flex items-center gap-3.5 shadow-sm",children:[e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsxs("span",{className:"text-[10px] font-black text-neutral-400 dark:text-neutral-500 uppercase tracking-widest flex items-center gap-1",children:["Network Participation",e.jsx("span",{className:"text-neutral-500 dark:text-neutral-500 text-[10px] cursor-help",title:"Allows other network members to place links back to your sitemap targets",children:"ⓘ"})]}),e.jsx("span",{className:"text-xs font-bold text-neutral-500 dark:text-neutral-500 mt-1",children:t.get_backlinks_enabled?"Enabled":"Disabled"})]}),e.jsx("button",{onClick:g,disabled:k,className:`relative inline-flex h-5 w-10 shrink-0 cursor-pointer rounded-full border border-transparent transition-colors duration-200 ease-in-out outline-none ${t.get_backlinks_enabled?"bg-brand-primary":"bg-neutral-200 dark:bg-neutral-700"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition duration-200 ease-in-out ${t.get_backlinks_enabled?"translate-x-5":"translate-x-0"}`})})]})]}),e.jsxs("div",{className:"bg-orange-50/30 dark:bg-orange-950/20 border border-orange-100/70 dark:border-orange-900/30 px-4 py-3 rounded flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3",children:[e.jsxs("div",{className:"text-sm text-neutral-755 dark:text-neutral-300 font-medium flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-brand-primary animate-ping"}),e.jsx("span",{children:"Your Backlink Network Exchange is fully active. Build and publish blog posts to automatically earn exchange credits."})]}),e.jsx("button",{disabled:!0,className:"px-3 py-1.5 bg-neutral-200 dark:bg-neutral-800 text-neutral-400 text-xs font-bold rounded cursor-not-allowed border border-neutral-300 dark:border-neutral-700",children:"Get More Credits"})]}),e.jsx(C,{accentColor:"indigo",context:"Earn high-quality backlinks automatically by participating in the Growlytics exchange network.",steps:[{number:1,title:"Enable Participation",description:"Turn on Network Participation to allow other network members to place links back to your site."},{number:2,title:"Earn Exchange Credits",description:e.jsxs("span",{children:["Publish articles using Content Planner to ",e.jsx("strong",{className:"text-indigo-700 font-bold",children:"automatically earn credits"})," — more credits = higher link placement priority."]})},{number:3,title:"Track Earned Backlinks",description:"View all backlinks received vs. given in the tabs below and monitor your Domain Rating over time."}]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-800 rounded p-5 flex flex-col justify-between space-y-4 bg-white dark:bg-neutral-850",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider flex items-center gap-1.5",children:["Backlink Credits",e.jsx("span",{className:"text-neutral-300 dark:text-neutral-500 cursor-help text-[10px]",title:"Credits are used when other sites list your link.",children:"ⓘ"})]}),e.jsx("p",{className:"text-3xl font-black text-neutral-900 dark:text-white mt-2",children:t.credits})]}),e.jsx("button",{disabled:!0,className:"px-4 py-2 bg-neutral-200 dark:bg-neutral-800 text-neutral-400 text-xs font-extrabold rounded shadow-sm cursor-not-allowed border border-neutral-300 dark:border-neutral-700",children:"Get Monthly Credits →"})]}),e.jsx("p",{className:"text-[11px] text-neutral-500 dark:text-neutral-400",children:"More credits = higher priority in automatic link placements across the exchange."})]}),e.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-800 rounded p-5 space-y-4 bg-white dark:bg-neutral-850",children:[e.jsxs("h4",{className:"text-xs font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider flex items-center gap-1.5",children:["Backlink Performance",e.jsx("span",{className:"text-neutral-300 dark:text-neutral-500 cursor-help text-[10px]",children:"ⓘ"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-1",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-neutral-400 dark:text-neutral-500 uppercase tracking-widest font-black",children:"Total Backlinks"}),e.jsx("p",{className:"text-2xl font-black text-neutral-900 dark:text-white mt-1",children:t.received_count}),e.jsx("span",{className:"text-xs text-neutral-400 dark:text-neutral-500 mt-0.5 block",children:"All Time"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-neutral-400 dark:text-neutral-500 uppercase tracking-widest font-black",children:"Unique Sources"}),e.jsx("p",{className:"text-2xl font-black text-neutral-900 dark:text-white mt-1",children:t.unique_sources_count}),e.jsx("span",{className:"text-xs text-neutral-400 dark:text-neutral-500 mt-0.5 block",children:"Different Websites"})]})]})]})]}),e.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-800 rounded overflow-hidden bg-white dark:bg-neutral-850 relative",children:[t.published_articles_count!==void 0&&t.published_articles_count<1&&t.received_count===0&&e.jsxs("div",{className:"absolute inset-0 bg-white/80 dark:bg-neutral-900/80 backdrop-blur-md z-30 flex flex-col items-center justify-center p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-brand-light dark:bg-brand-primary/10 border border-brand-primary/20 rounded-2xl flex items-center justify-center mb-4 text-brand-primary shadow-sm",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-8 h-8",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})}),e.jsx("h3",{className:"text-lg font-black text-neutral-900 dark:text-white mb-2",children:"Published Article Required"}),e.jsxs("p",{className:"text-sm text-neutral-500 max-w-md mb-6 leading-relaxed",children:["To unlock Backlink Network Exchange tracker and statistics, you must have at least ",e.jsx("strong",{children:"1 article successfully published"})," by our system. Currently, you have ",e.jsx("strong",{children:t.published_articles_count})," published ",t.published_articles_count===1?"article":"articles","."]}),e.jsx("a",{href:"/content-planner",className:"px-6 py-3 bg-brand-primary text-white font-extrabold text-xs uppercase tracking-widest rounded-xl hover:bg-orange-600 transition-colors shadow-lg shadow-brand-primary/20",children:"Go to Content Planner"})]}
1),e.jsxs("div",{className:"p-4 border-b border-neutral-100 dark:border-neutral-800 flex justify-between items-center bg-white dark:bg-neutral-850",children:[e.jsx("h3",{className:"text-xs font-black text-neutral-900 dark:text-white uppercase tracking-wider",children:"Earned Backlinks"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"verified_toggle",checked:b,onChange:r=>m(r.target.checked),className:"accent-brand-primary rounded"}),e.jsx("label",{htmlFor:"verified_toggle",className:"text-xs font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer",children:"Verified only"})]})]}),e.jsxs("div",{className:"flex border-b border-neutral-100 dark:border-neutral-800 px-4 bg-neutral-50/50 dark:bg-neutral-800/10",children:[e.jsxs("button",{onClick:()=>{(t.published_articles_count===void 0||t.published_articles_count>=1||t.received_count>0)&&u("received")},disabled:t.published_articles_count!==void 0&&t.published_articles_count<1&&t.received_count===0,className:`px-4 py-3 text-xs font-bold border-b-2 transition-all ${i==="received"?"border-brand-primary text-brand-primary":"border-transparent text-neutral-500 hover:text-neutral-850 dark:hover:text-neutral-200"} ${t.published_articles_count!==void 0&&t.published_articles_count<1&&t.received_count===0?"opacity-50 cursor-not-allowed":""}`,children:["Received Links (",f,")"]}),e.jsxs("button",{onClick:()=>{(t.published_articles_count===void 0||t.published_articles_count>=1||t.received_count>0)&&u("given")},disabled:t.published_articles_count!==void 0&&t.published_articles_count<1&&t.received_count===0,className:`px-4 py-3 text-xs font-bold border-b-2 transition-all ${i==="given"?"border-brand-primary text-brand-primary":"border-transparent text-neutral-500 hover:text-neutral-850 dark:hover:text-neutral-200"} ${t.published_articles_count!==void 0&&t.published_articles_count<1&&t.received_count===0?"opacity-50 cursor-not-allowed":""}`,children:["Given Links (",t.given_count,")"]})]}),i==="received"?d.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-neutral-50/40 dark:bg-neutral-800/40 border-b border-neutral-100 dark:border-neutral-800",children:[e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"Source Site"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"Target Page"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"DR Rating"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"Status"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider text-right",children:"Value"})]})}),e.jsx("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800 text-xs font-semibold",children:d.map((r,s)=>e.jsxs("tr",{className:"hover:bg-neutral-50/20 dark:hover:bg-neutral-800/10",children:[e.jsx("td",{className:"px-6 py-4 font-bold text-neutral-850 dark:text-neutral-100",children:e.jsx("a",{href:r.source_article,target:"_blank",rel:"noopener noreferrer",className:"text-brand-primary hover:underline break-all",children:r.source_article})}),e.jsx("td",{className:"px-6 py-4 text-neutral-500 dark:text-neutral-400 font-mono",children:e.jsx("a",{href:r.target_page,target:"_blank",rel:"noopener noreferrer",className:"hover:underline break-all",children:r.target_page})}),e.jsxs("td",{className:"px-6 py-4 font-bold text-neutral-700 dark:text-neutral-300",children:["DR ",r.domain_rating]}),e.jsx("td",{className:"px-6 py-4",children:r.is_verified?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-black uppercase tracking-wider bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 border border-emerald-200 dark:border-emerald-800",children:[e.jsx(w,{className:"w-3 h-3"})," Verified"]}):e.jsx("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-black uppercase tracking-wider bg-amber-50 dark:bg-amber-900/20 text-amber-600 dar
1k:text-amber-400 border border-amber-200 dark:border-amber-800",children:"Pending Review"})}),e.jsxs("td",{className:"px-6 py-4 text-right text-emerald-600 dark:text-emerald-400 font-black",children:["$",r.link_value]})]},s))})]})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center space-y-3 bg-white dark:bg-neutral-850",children:[e.jsx("div",{className:"w-12 h-12 rounded bg-neutral-50 dark:bg-neutral-800 flex items-center justify-center text-neutral-400 border border-neutral-100 dark:border-neutral-700",children:e.jsx(v,{className:"w-6 h-6"})}),e.jsx("h4",{className:"text-sm font-bold text-neutral-900 dark:text-white",children:"No backlinks yet"}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400 max-w-xs font-medium",children:"You haven't received any backlinks yet. As you continue generating content, other websites in the network will link to yours."})]}):t.given_links.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-neutral-50/40 dark:bg-neutral-800/40 border-b border-neutral-100 dark:border-neutral-800",children:[e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"Target Page"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"Partner Website"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider",children:"DR Rating"}),e.jsx("th",{className:"px-6 py-3.5 text-[10px] font-black uppercase text-neutral-400 dark:text-neutral-500 tracking-wider text-right",children:"Value Generated"})]})}),e.jsx("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800 text-xs font-semibold",children:t.given_links.map((r,s)=>e.jsxs("tr",{className:"hover:bg-neutral-50/20 dark:hover:bg-neutral-800/10",children:[e.jsx("td",{className:"px-6 py-4 font-bold text-neutral-850 dark:text-neutral-100",children:e.jsx("a",{href:r.target_article,target:"_blank",rel:"noopener noreferrer",className:"text-brand-primary hover:underline break-all",children:r.target_article})}),e.jsx("td",{className:"px-6 py-4 text-neutral-500 dark:text-neutral-400 font-mono",children:r.customer_website}),e.jsxs("td",{className:"px-6 py-4 font-bold text-neutral-700 dark:text-neutral-300",children:["DR ",r.domain_rating]}),e.jsxs("td",{className:"px-6 py-4 text-right text-emerald-600 dark:text-emerald-400 font-black",children:["$",r.link_value]})]},s))})]})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center space-y-3 bg-white dark:bg-neutral-850",children:[e.jsx("div",{className:"w-12 h-12 rounded bg-neutral-50 dark:bg-neutral-800 flex items-center justify-center text-neutral-400 border border-neutral-100 dark:border-neutral-700",children:e.jsx(N,{className:"w-6 h-6"})}),e.jsx("h4",{className:"text-sm font-bold text-neutral-900 dark:text-white",children:"No given backlinks yet"}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400 max-w-xs font-medium",children:"As you write blog posts, Growlytics will insert links to relevant partners automatically. When that happens, you will earn credits."})]})]})]})};export{q 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.