import { Box, BoxProps, Button, Center, Container, Flex, Group, HStack, Image, Span, Stack, Text, } from "@chakra-ui/react" import { Blob } from "./blob" import { GoldSponsorIcon, OpenCollective, Patreon, SilverSponsorIcon, } from "./icons" import { SponsorImage } from "./sponsor-image" import { BlitzHeading, HighlightHeading } from "./typography" const CallToActions = () => ( ) const SponsorGroup = (props: { sponsors: Sponsor[] size?: BoxProps["boxSize"] }) => { const { sponsors, size = "10" } = props return ( *": { "--border-width": "1px", borderWidth: "1px", borderColor: { _light: "border", _dark: "#001B18" }, mr: "calc(var(--border-width) * -1)", mb: "calc(var(--border-width) * -1)", py: "4", }, }} > {sponsors.map((sponsor) => { return (
) })}
) } interface Sponsor { MemberId: number createdAt: string type: string role: string tier: string isActive: boolean totalAmountDonated: number currency: string lastTransactionAt: string lastTransactionAmount: number profile: string name: string company: string | null description: string | null image: string email: string | null twitter: string | null github: string | null website: string | null } const TierHeading = (props: { tier: string; icon: React.ElementType }) => { const { tier, icon: Icon } = props return ( {tier} ) } const SponsorsList = async () => { const response = await fetch( "https://opencollective.com/chakra-ui/members/all.json", ) const allSponsors: Sponsor[] = await response.json() const companies = allSponsors .filter((sponsor) => sponsor.tier && sponsor.type === "ORGANIZATION") .sort((a, b) => b.totalAmountDonated - a.totalAmountDonated) const platinumSponsors = companies.filter((c) => c.tier.includes("Platinum")) const goldSponsors = companies.filter((c) => c.tier.includes("Gold")) const silverSponsors = companies.filter((c) => c.tier.includes("Silver")) const bronzeSponsors = companies.filter((c) => c.tier.includes("Bronze")) return ( ) } export const SponsorSection = () => { return ( Sponsors Sponsored by these amazing companies Our maintainers devote their time, effort, and heart to ensure Chakra UI keeps getting better.{" "} Support us by donating to our collective 🙏 ) }