mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-03 20:00:17 -04:00
2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
"use strict";(self.webpackChunksga_website=self.webpackChunksga_website||[]).push([[647],{96:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(579);function n(e){let{children:t,...r}=e;return(0,a.jsx)("h1",{className:"my-4",...r,children:t})}},336:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(579);function n(e){let{imageURL:t="/images/hero.jpg",heading:r="TJHSST SGA"}=e;return(0,a.jsxs)("div",{className:"hero",children:[(0,a.jsx)("span",{className:"hero-heading",children:r}),(0,a.jsx)("img",{src:t,alt:"Background",style:{width:"100vw",maxHeight:"60vh",objectFit:"contain"}})]})}},3213:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(5475),n=r(579);function s(e){let{href:t,children:r,target:s}=e;return t.startsWith("http")?(0,n.jsx)("a",{href:t,className:"clickable-link",target:s,children:r}):(0,n.jsx)(a.N_,{to:t,className:"clickable-link",children:r})}},3647:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var a=r(5043),n=r(3216),s=r(9760),i=r.n(s),l=r(579);function c(e){let{blocks:t}=e;return(0,l.jsx)("div",{ref:e=>{e&&e.querySelectorAll("a").forEach((e=>{e.target="_blank"}))},children:(0,l.jsx)(i(),{blocks:t,projectId:"yi263kzm",dataset:"production"})})}var h=r(3213),d=r(336),o=r(96),u=(r(4757),r(3628));var g=r(8294);function j(){let{articleId:e}=(0,n.g)(),t=function(e){let[t,r]=(0,a.useState)(null);return(0,a.useEffect)((()=>{u.A.fetch("*[_id == $articleId] [0]",{articleId:e}).then(r)}),[e]),t}(e||""),r="/images/hero.png";null!==t&&void 0!==t&&t.thumbnail&&(r=(0,g.A)(t.thumbnail).url());const s=(0,l.jsx)(h.A,{href:"/news",children:"Go to all news articles"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.A,{heading:"News",imageURL:r||void 0}),(0,l.jsx)("main",{children:t?(0,l.jsxs)("div",{style:{maxWidth:"640px",margin:"2rem auto"},children:[s,(0,l.jsx)(o.A,{children:t.title}),(0,l.jsxs)("i",{children:["Posted ",t.publish_date," by ",t.author||"No author"]}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"article-paragraphs",children:(0,l.jsx)(c,{blocks:t.content})}),(0,l.jsx)("br",{}),s]}):null})]})}},4757:()=>{},8294:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(138),n=r.n(a),s=r(3628);const i=n()(s.A);function l(e){return i.image(e)}}}]);
|
|
//# sourceMappingURL=647.9dfaa63d.chunk.js.map
|