"use strict";(self.webpackChunkAutoGen_Assistant=self.webpackChunkAutoGen_Assistant||[]).push([[618],{18700:function(e,t,l){l.r(t),l.d(t,{default:function(){return u}});var a=l(67294),s=l(30372),n=l(91160),r=l(15596),c=l(1642),i=l(71968);var o=()=>{const e=(0,r.RU)(),{user:t}=a.useContext(n.T),[l,s]=a.useState(!1),[o,u]=a.useState(null),m=`${e}/gallery?user_id=${null==t?void 0:t.email}`,[d,g]=a.useState({status:!0,message:"All good"});a.useEffect((()=>{E()}),[]);const E=()=>{g(null),s(!0);(0,r.ZV)(m,{method:"GET",headers:{"Content-Type":"application/json"}},(e=>{console.log(e),e&&e.status?(c.ZP.success(e.message),console.log("gallery",e),u(e.data)):c.ZP.error(e.message),s(!1)}),(e=>{g(e),c.ZP.error(e.message),s(!1)}))},v=null==o?void 0:o.map(((e,t)=>a.createElement("div",{key:"galleryrow"+t},a.createElement(i.Zb,{title:e.id},a.createElement("div",null,(0,r.Sy)(e.timestamp))))));return a.createElement("div",{className:" "},a.createElement("div",{className:"mb-4 text-2xl"},"Gallery"),a.createElement("div",null,"View a collection of AutoGen agent specifications and sessions "),a.createElement("div",{className:"mt-4 grid gap-3 grid-cols-2 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"},v),l&&a.createElement("div",{className:"w-full text-center boder mt-4"},a.createElement("div",null," ",a.createElement(i.F8,null)),"loading gallery"))};var u=e=>{let{data:t}=e;return a.createElement(s.Z,{meta:t.site.siteMetadata,title:"Gallery",link:"/gallery"},a.createElement("main",{style:{height:"100%"},className:" h-full "},a.createElement(o,null)))}}}]);
//# sourceMappingURL=component---src-pages-gallery-index-tsx-e3e4e969bf9cd607c199.js.map