{"version":3,"file":"top-sponsors-layout-c94fb752.js","sources":["../../../app/frontend/components/ui/top-sponsor-card.tsx","../../../app/frontend/components/layouts/top-sponsors-layout.tsx"],"sourcesContent":["import { Link } from \"react-router-dom\"\nimport { FragmentType, getFragmentData, gql } from \"~/__generated__\"\nimport { sponsorDetailPath } from \"~/common/paths\"\nimport { Badge } from \"~/components/ui/badge\"\nimport { Button } from \"~/components/ui/button\"\nimport { Card, CardContent, CardTitle } from \"~/components/ui/card\"\n\nconst TopSponsorCardFragment = gql(/* GraphQL */ `\n fragment TopSponsorCard on Sponsor {\n slug\n sponsorName\n aboutTextFromLinkedIn\n logo {\n id\n thumbnailUrl\n }\n displayIndustry {\n id\n name\n }\n }\n`)\n\nexport const TopSponsorCard = ({\n ...props\n}: {\n sponsor: FragmentType\n}) => {\n const sponsor = getFragmentData(TopSponsorCardFragment, props.sponsor)\n\n return (\n \n \n \n
\n {sponsor.logo && (\n \n )}\n
\n
\n \n {sponsor.sponsorName}\n \n
\n {sponsor.aboutTextFromLinkedIn}\n
\n
\n {sponsor.displayIndustry && (\n {sponsor.displayIndustry.name}\n )}\n
\n
\n
\n \n
\n
\n
\n \n )\n}\n","import { useQuery } from \"@apollo/client\"\nimport { gql } from \"~/__generated__\"\nimport { GraphqlError } from \"~/components/errors/graph-error\"\nimport { LoadingIndicatorCentered } from \"~/components/ui/loading-indicator\"\nimport { TopSponsorCard } from \"~/components/ui/top-sponsor-card\"\nimport { useDocumentTitle } from \"~/hooks/use-document-title\"\n\nconst query = gql(/* GraphQL */ `\n query TopSponsorsLayout($industryName: String, $year: Int) {\n topSponsors(industryName: $industryName, year: $year) {\n edges {\n node {\n id\n ...TopSponsorCard\n }\n }\n }\n }\n`)\n\nexport const TopSponsorsLayout = ({\n title,\n description,\n industryName,\n year,\n}: {\n title: string\n description: string\n industryName?: string\n year?: number\n}) => {\n const result = useQuery(query, { variables: { industryName, year } })\n const data = result.data ?? result.previousData\n useDocumentTitle(title)\n\n return (\n
\n

{title}

\n
{description}
\n \n {result.loading && (\n
\n \n
\n )}\n {data && data.topSponsors.edges.length === 0 ? (\n
No Sponsors found.
\n ) : null}\n
\n {data &&\n data.topSponsors.edges\n .map((e) => e.node)\n .map((sponsor) => (\n \n ))}\n
\n
\n )\n}\n"],"names":["TopSponsorCardFragment","gql","TopSponsorCard","props","sponsor","getFragmentData","jsx","Link","sponsorDetailPath","Card","jsxs","CardContent","CardTitle","Badge","Button","query","TopSponsorsLayout","title","description","industryName","year","result","useQuery","data","useDocumentTitle","GraphqlError","LoadingIndicatorCentered","e"],"mappings":"+IAOA,MAAMA,EAAyBC,EAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAchD,EAEYC,EAAiB,CAAC,CAC7B,GAAGC,CACL,IAEM,CACJ,MAAMC,EAAUC,EAAgBL,EAAwBG,EAAM,OAAO,EAGnE,OAAAG,EAAA,IAACC,EAAA,CACC,GAAIC,EAAkB,CAAE,YAAaJ,EAAQ,KAAM,EACnD,UAAU,qBAEV,eAACK,EAAK,CAAA,UAAU,qBACd,SAACC,EAAAA,KAAAC,EAAA,CAAY,UAAU,sCACrB,SAAA,CAAAL,EAAA,IAAC,MAAI,CAAA,UAAU,sGACZ,SAAAF,EAAQ,MACPE,EAAA,IAAC,MAAA,CACC,IAAKF,EAAQ,KAAK,aAClB,UAAU,kCACV,IAAK,GAAGA,EAAQ,WAAW,OAAA,CAAA,EAGjC,EACAM,EAAAA,KAAC,MAAI,CAAA,UAAU,gCACb,SAAA,CAAAJ,EAAA,IAACM,EAAU,CAAA,UAAU,4BAClB,SAAAR,EAAQ,YACX,EACCE,EAAA,IAAA,MAAA,CAAI,UAAU,sBACZ,WAAQ,sBACX,EACCA,EAAA,IAAA,MAAA,CAAI,UAAU,uBACZ,SAAQF,EAAA,iBACNE,EAAA,IAAAO,EAAA,CAAM,QAAQ,UAAW,SAAQT,EAAA,gBAAgB,IAAK,CAAA,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