1import{j as e}from"./motion-vendor-DKMstkyv.js";import{d as N,r,H as b}from"./react-vendor-BJrnfiOv.js";import{S as m,d as c,A as v,P as A,i as $,j as E}from"./index-1qLqyNXL.js";import{T as k}from"./ui-vendor-zw4bJkc0.js";import"./utils-vendor-DbuwbPvk.js";function I(){const{slug:n,page:x}=N(),[t,h]=r.useState(null),[l,j]=r.useState([]),[u,f]=r.useState(1),[y,p]=r.useState(!0),a=parseInt(x||"1");if(r.useEffect(()=>{(async()=>{if(n){p(!0);try{const s=await $(n);if(h(s),s){const g=await E(s.id,a);j(g.data),f(g.totalPages)}}catch(s){console.error("Error fetching tag articles:",s)}finally{p(!1)}}})(),window.scrollTo({top:0,left:0,behavior:"instant"})},[n,a]),y)return e.jsxs("div",{className:"container mx-auto px-4 py-24",children:[e.jsx(m,{className:"h-12 w-64 mb-4"}),e.jsx(m,{className:"h-6 w-96 mb-12"}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[...Array(6)].map((o,s)=>e.jsx(m,{className:"h-96 rounded-2xl"},s))})]});if(!t)return e.jsx("div",{className:"container mx-auto px-4 py-32 text-center",children:e.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Tag non trouvé"})});const d=`https://connect.enwo.network/tag/${n}${a>1?`/page/${a}`:""}`,i=a>1?`#${c(t.name)} - Page ${a} - ENWO`:`#${c(t.name)} - ENWO`,w={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://connect.enwo.network"},{"@type":"ListItem",position:2,name:`#${c(t.name)}`,item:`https://connect.enwo.network/tag/${n}`}]};return e.jsxs(e.Fragment,{children:[e.jsxs(b,{children:[e.jsx("title",{children:i}),e.jsx("meta",{name:"description",content:t.description||`Articles avec le tag ${t.name}`}),e.jsx("link",{rel:"canonical",href:d}),a>1&&e.jsx("meta",{name:"robots",content:"noindex, follow"}),e.jsx("meta",{property:"og:locale",content:"fr_FR"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:title",content:i}),e.jsx("meta",{property:"og:description",content:t.description||`Articles avec le tag ${t.name}`}),e.jsx("meta",{property:"og:url",content:d}),e.jsx("meta",{property:"og:site_name",content:"ENWO"}),e.jsx("meta",{property:"og:image",content:"https://connect.enwo.network/assets/og-default.png"}),e.jsx("meta",{property:"og:image:secure_url",content:"https://connect.enwo.network/assets/og-default.png"}),e.jsx("meta",{property:"og:image:width",content:"1024"}),e.jsx("meta",{property:"og:image:height",content:"1024"}),e.jsx("meta",{property:"og:image:alt",content:"ENWO - L'IA propose... L'humain dispose"}),e.jsx("meta",{name:"twitter:card",content:"summary"}),e.jsx("meta",{name:"twitter:title",content:i}),e.jsx("meta",{name:"twitter:description",content:t.description||`Articles avec le tag ${t.name}`}),e.jsx("meta",{name:"twitter:image",content:"https://connect.enwo.network/assets/og-default.png"}),e.jsx("meta",{name:"twitter:image:alt",content:"ENWO - L'IA propose... L'humain dispose"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(w)})]}),e.jsx("div",{className:"min-h-screen bg-background py-24",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"size-12 rounded-xl bg-secondary/10 flex items-center justify-center",children:e.jsx(k,{className:"size-6 text-secondary"})}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-secondary",children:["#",c(t.name)]})]}),t.description&&e.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl",children:t.description}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[t.count," ",t.count>1?"articles":"article"]})]}),l.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:l.map((o,s)=>e.jsx(v,{article:o,index:s},o.id))}),e.jsx(A,{currentPage:a,totalPages:u,baseUrl:`/tag/${n}`,canonicalBase:"https://connect.enwo.network"})]}):e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"Aucun article avec ce tag."})})]})})]})}export{I as TagArchive,I 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.