PageSourceSearch

https://fostersfreeze.com/assets/SocialMediaFeed-BfBPWwep.js

js fostersfreeze.com collected 2026-10-02 09:58:10 UTC 8,044 bytes, 1 lines download raw bytes

1import{b as i,j as e}from"./vendor-BAdWL77K.js";import{t as m,aa as n}from"./index-BfbLyb2b.js";import{R as p}from"./refresh-cw-Cxny6XI6.js";import{E as v}from"./external-link-CCUYXe-x.js";function w(){const[t,o]=i.useState("all"),[a,l]=i.useState(!1),{data:h}=m.featureFlags.list.useQuery(),r=h?.find(s=>s.flagKey==="socialMediaFeedEnabled")?.enabled??!1,{data:x,isLoading:g,refetch:c}=m.socialMedia.list.useQuery({limit:12,platform:t==="all"?void 0:t},{staleTime:300*1e3,enabled:r});i.useEffect(()=>{if(!r)return;const s=setInterval(()=>{l(!0),c().finally(()=>l(!1))},300*1e3);return()=>clearInterval(s)},[c,r]);const f=async()=>{l(!0),await c(),l(!1)},d=i.useMemo(()=>x||[],[x]);return r?g?e.jsxs("section",{className:"container py-16 md:py-24",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-3",style:{color:"var(--denim)"},children:"Follow Us"}),e.jsx("p",{className:"text-gray-600 text-lg",children:"Loading our latest posts..."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(8)].map((s,u)=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"aspect-square bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 rounded-lg animate-pulse"}),e.jsxs("div",{className:"space-y-2 px-2",children:[e.jsx("div",{className:"h-3 bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 rounded animate-pulse"}),e.jsx("div",{className:"h-3 bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 rounded animate-pulse w-5/6"})]})]},u))})]}):!d||d.length===0?e.jsx("section",{className:"container py-16 md:py-24",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-3",style:{color:"var(--denim)"},children:"Follow Us"}),e.jsx("p",{className:"text-gray-600 text-lg",children:"Check back soon for our latest posts!"})]})}):e.jsxs("section",{className:"container py-16 md:py-24",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-3",style:{color:"var(--denim)"},children:"Follow Us"}),e.jsx("p",{className:"text-gray-600 text-lg mb-6",children:"Check out our latest updates on Instagram and Facebook"}),e.jsx("div",{className:"flex justify-center mb-6",children:e.jsxs("button",{onClick:f,disabled:a,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full text-sm font-semibold transition-all",style:{background:a?"var(--vanilla)":"var(--cream)",color:"var(--denim)",border:"2px solid var(--denim)/20",opacity:a?.7:1,cursor:a?"not-allowed":"pointer"},title:a?"Refreshing posts...":"Click to refresh posts now",children:[e.jsx(p,{size:16,className:a?"animate-spin":""}),a?"Refreshing...":"Refresh Feed"]})}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[e.jsx("button",{onClick:()=>o("all"),className:`px-6 py-2 rounded-full font-semibold transition-all ${t==="all"?"bg-[var(--cherry)] text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:"All Posts"}),e.jsxs("button",{onClick:()=>o("instagram"),className:`px-6 py-2 rounded-full font-semibold transition-all flex items-center gap-2 ${t==="instagram"?"bg-gradient-to-r from-[#F58529] to-[#DD2A7B] text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:[e.jsx(n,{size:18}),"Instagram"]}),e.jsxs("button",{onClick:()=>o("facebook"),className:`px-6 py-2 rounded-full font-semibold transition-all flex items-center gap-2 ${t==="facebook"?"bg-[#1877F2] text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:[e.jsx("svg",{className:"w-[18px] h-[18px]",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Facebook"]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:d.map(s=>e.jsxs("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"group relative overflow-hidden rounded-lg aspect-square bg-gray-200 hover:shadow-lg transition-all duration-300",children:[e.jsx("img",{src:s.imageUrl,alt:s.caption||`${s.platform} post`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors duration-300 flex flex-col items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:e.jsxs("div",{className:"text-white text-center px-4",children:[e.jsx("div",{className:"mb-3 flex justify-center",children:s.platform==="instagram"?e.jsx(n,{size:24}
1):e.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})}),e.jsxs("div",{className:"flex justify-center gap-6 text-sm font-semibold",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-lg",children:s.likes}),e.jsx("div",{className:"text-xs opacity-80",children:"Likes"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-lg",children:s.comments}),e.jsx("div",{className:"text-xs opacity-80",children:"Comments"})]})]}),e.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 text-sm font-semibold",children:["View Post",e.jsx(v,{size:16})]})]})}),e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white",style:{background:s.platform==="instagram"?"linear-gradient(45deg,#F58529,#DD2A7B,#8134AF)":"#1877F2"},children:s.platform==="instagram"?e.jsx(n,{size:16}):e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})})}),s.featured&&e.jsx("div",{className:"absolute top-3 left-3",children:e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-bold text-white",style:{background:"var(--cherry)"},children:"Featured"})})]},s.id))}),e.jsxs("div",{className:"text-center mt-12",children:[e.jsx("p",{className:"text-gray-600 mb-4",children:"Follow us for daily updates, menu specials, and behind-the-scenes content"}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[e.jsxs("a",{href:"https://www.instagram.com/FostersFreeze/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full font-semibold text-white transition-all hover:shadow-lg",style:{background:"linear-gradient(45deg,#F58529,#DD2A7B,#8134AF)"},children:[e.jsx(n,{size:20}),"Follow on Instagram"]}),e.jsxs("a",{href:"https://www.facebook.com/FostersFreeze/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full font-semibold text-white bg-[#1877F2] transition-all hover:shadow-lg",children:[e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Follow on Facebook"]})]})]})]}):null}export{w 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.