mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-03 20:00:17 -04:00
1 line
5.0 KiB
Plaintext
1 line
5.0 KiB
Plaintext
{"version":3,"file":"static/js/958.f1d3f46a.chunk.js","mappings":"sIAEe,SAASA,EAAIC,GAMxB,IANyB,SAC5BC,EAAW,mBAAkB,QAC7BC,EAAU,cAIVF,EACA,OACCG,EAAAA,EAAAA,MAAA,OAAKC,UAAU,OAAMC,SAAA,EACpBC,EAAAA,EAAAA,KAAA,QAAMF,UAAU,eAAcC,SAAEH,KAChCI,EAAAA,EAAAA,KAAA,OACCC,IAAKN,EACLO,IAAI,aACJC,MAAO,CACNC,MAAO,QACPC,UAAW,OACXC,UAAW,eAKhB,C,sECpBe,SAASC,EAAYC,EAAeC,GAClD,IAAKC,EAAQC,GAAaC,EAAAA,WAM1B,OAJAA,EAAAA,WAAgB,KACfC,EAAAA,EAAOC,MAAMN,EAAOC,GAAQM,KAAKJ,EAAU,GACzC,CAACH,EAAOC,IAEJC,CACR,C,kECRA,MAAMM,EAAUC,IAAgBJ,EAAAA,GAMjB,SAASK,EAASC,GAChC,OAAOH,EAAQI,MAAMD,EACtB,C,oECXe,SAASE,EAAU3B,GAI9B,IAJ+B,SAClCK,GAGAL,EACA,OACCM,EAAAA,EAAAA,KAAA,OAAKG,MAAO,CAAEmB,QAAS,OAAQC,cAAe,UAAWxB,SAAEA,GAE7D,C,kDCJe,SAASyB,EAAa9B,GAIjC,IAJkC,WACrC+B,GAGA/B,EACIgC,EAA0B,KAK9B,OAJID,EAAWE,YACdD,GAAWR,EAAAA,EAAAA,GAASO,EAAWE,WAAWC,QAI1C/B,EAAAA,EAAAA,MAAA,OAAKC,UAAU,cAAaC,SAAA,EAC3BC,EAAAA,EAAAA,KAAA,OAAKF,UAAU,wBAAuBC,SACpC2B,GAAW1B,EAAAA,EAAAA,KAAA,OAAKC,IAAKyB,EAAUxB,IAAKuB,EAAWI,OAAW,QAE5DhC,EAAAA,EAAAA,MAAA,OAAKC,UAAU,sBAAqBC,SAAA,EACnCC,EAAAA,EAAAA,KAAA,MAAIF,UAAU,SAAQC,SAAE0B,EAAWI,QACnC7B,EAAAA,EAAAA,KAAC8B,IAAY,CAACC,OAAQN,EAAWO,eAIrC,C,cCnBe,SAASC,IAAe,IAADC,EACrC,IAAIC,EAC2D,QADhDD,GACd3B,EAAAA,EAAAA,GAAmC,mCAA2B,IAAA2B,EAAAA,EAAI,GAEnE,OACCrC,EAAAA,EAAAA,MAAAuC,EAAAA,SAAA,CAAArC,SAAA,EACCC,EAAAA,EAAAA,KAACP,EAAAA,EAAI,CAACG,QAAQ,iBACdI,EAAAA,EAAAA,KAAA,QAAAD,UACCC,EAAAA,EAAAA,KAACqB,EAAU,CAAAtB,SACToC,EAAYE,KAAKZ,IACjBzB,EAAAA,EAAAA,KAACwB,EAAa,CAACC,WAAYA,YAMjC,C","sources":["components/Hero.tsx","hooks/useQuery.ts","lib/imageUrl.ts","components/FlexColumn.tsx","components/InitiativeRow.tsx","pages/initiatives.tsx"],"sourcesContent":["import '../css/hero.css';\r\n\r\nexport default function Hero({\r\n\timageURL = '/images/hero.jpg',\r\n\theading = 'TJHSST SGA',\r\n}: {\r\n\timageURL?: string;\r\n\theading?: string;\r\n}) {\r\n\treturn (\r\n\t\t<div className='hero'>\r\n\t\t\t<span className='hero-heading'>{heading}</span>\r\n\t\t\t<img\r\n\t\t\t\tsrc={imageURL}\r\n\t\t\t\talt='Background'\r\n\t\t\t\tstyle={{\r\n\t\t\t\t\twidth: '100vw',\r\n\t\t\t\t\tmaxHeight: '60vh',\r\n\t\t\t\t\tobjectFit: 'contain',\r\n\t\t\t\t}}\r\n\t\t\t/>\r\n\t\t</div>\r\n\t);\r\n}\r\n","import React from 'react';\r\nimport sanity from '../sanity';\r\n\r\nexport default function useQuery<T>(query: string, params?: any) {\r\n\tlet [result, setResult] = React.useState<T>();\r\n\r\n\tReact.useEffect(() => {\r\n\t\tsanity.fetch(query, params).then(setResult);\r\n\t}, [query, params]);\r\n\r\n\treturn result;\r\n}\r\n","import { default as ImageUrlBuilder } from '@sanity/image-url';\r\nimport sanity from '../sanity';\r\n\r\nconst builder = ImageUrlBuilder(sanity);\r\n\r\n/**\r\n * Build a URL for an image based on specified attributes\r\n * @param {SanityImageSource} source The source image\r\n */\r\nexport default function imageUrl(source: any) {\r\n\treturn builder.image(source);\r\n}\r\n","export default function FlexColumn({\r\n\tchildren,\r\n}: {\r\n\tchildren: React.ReactNode;\r\n}) {\r\n\treturn (\r\n\t\t<div style={{ display: 'flex', flexDirection: 'column' }}>{children}</div>\r\n\t);\r\n}\r\n","import imageUrl from '../lib/imageUrl';\r\nimport BlockContent from '@sanity/block-content-to-react';\r\nimport '../css/article.css';\r\n\r\nexport default function InitiativeRow({\r\n\tinitiative,\r\n}: {\r\n\tinitiative: SGA.InitiativeDocument;\r\n}) {\r\n\tlet thumbUrl: string | null = null;\r\n\tif (initiative.thumbnail) {\r\n\t\tthumbUrl = imageUrl(initiative.thumbnail).url();\r\n\t}\r\n\r\n\treturn (\r\n\t\t<div className='d-flex my-4'>\r\n\t\t\t<div className='article-row-thumbnail'>\r\n\t\t\t\t{thumbUrl ? <img src={thumbUrl} alt={initiative.name} /> : null}\r\n\t\t\t</div>\r\n\t\t\t<div className='article-row-content'>\r\n\t\t\t\t<h3 className='header'>{initiative.name}</h3>\r\n\t\t\t\t<BlockContent blocks={initiative.content} />\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n}\r\n","import React from 'react';\r\nimport FlexColumn from '../components/FlexColumn';\r\nimport Hero from '../components/Hero';\r\nimport InitiativeRow from '../components/InitiativeRow';\r\nimport useQuery from '../hooks/useQuery';\r\n\r\nexport default function Initiatives() {\r\n\tlet initiatives =\r\n\t\tuseQuery<SGA.InitiativeDocument[]>('*[_type == \"initiative\"]') ?? [];\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<Hero heading='Initiatives' />\r\n\t\t\t<main>\r\n\t\t\t\t<FlexColumn>\r\n\t\t\t\t\t{initiatives.map((initiative) => (\r\n\t\t\t\t\t\t<InitiativeRow initiative={initiative} />\r\n\t\t\t\t\t))}\r\n\t\t\t\t</FlexColumn>\r\n\t\t\t</main>\r\n\t\t</>\r\n\t);\r\n}\r\n"],"names":["Hero","_ref","imageURL","heading","_jsxs","className","children","_jsx","src","alt","style","width","maxHeight","objectFit","useQuery","query","params","result","setResult","React","sanity","fetch","then","builder","ImageUrlBuilder","imageUrl","source","image","FlexColumn","display","flexDirection","InitiativeRow","initiative","thumbUrl","thumbnail","url","name","BlockContent","blocks","content","Initiatives","_useQuery","initiatives","_Fragment","map"],"sourceRoot":""} |