|
| 1 | +/* eslint-disable tailwindcss/no-custom-classname */ |
| 2 | +import React from "react" |
| 3 | +import { ReactComponent as GraphQLWeekly } from "../../../../static/img/conf/Partners/GraphQLWeekly.svg" |
| 4 | +import { ReactComponent as GraphQLWTF } from "../../../../static/img/conf/Partners/GraphQLwtf.svg" |
| 5 | +import { ReactComponent as EscapeTechnologies } from "../../../../static/img/conf/Partners/EscapeTechnologies.svg" |
| 6 | + |
| 7 | +interface Image { |
| 8 | + iconPath: string |
| 9 | + name: string |
| 10 | + link: string |
| 11 | +} |
| 12 | + |
| 13 | +function alphabetSort(a: Image, b: Image) { |
| 14 | + if (a.name < b.name) { |
| 15 | + return -1 |
| 16 | + } |
| 17 | + if (a.name > b.name) { |
| 18 | + return 1 |
| 19 | + } |
| 20 | + return 0 |
| 21 | +} |
| 22 | + |
| 23 | +const mediaPartners: Image[] = [ |
| 24 | + { |
| 25 | + iconPath: GraphQLWeekly, |
| 26 | + name: "GraphQLWeekly", |
| 27 | + link: "https://www.graphqlweekly.com/", |
| 28 | + }, |
| 29 | + { |
| 30 | + iconPath: GraphQLWTF, |
| 31 | + name: "GraphQLWTF", |
| 32 | + link: "https://graphql.wtf/", |
| 33 | + }, |
| 34 | +] |
| 35 | + |
| 36 | +const communityPartners: Image[] = [ |
| 37 | + { |
| 38 | + iconPath: EscapeTechnologies, |
| 39 | + name: "EscapeTechnologies", |
| 40 | + link: "https://escape.tech/", |
| 41 | + }, |
| 42 | +] |
| 43 | + |
| 44 | +const PartnersConf = () => { |
| 45 | + return ( |
| 46 | + <div id="partners" className="bg-white py-10 static"> |
| 47 | + <h1 className="text-center text-4xl text-[#171E26] font-bold my-8"> |
| 48 | + Partners |
| 49 | + </h1> |
| 50 | + <h3 className="text-center text-[--rhodamine] font-bold my-10 underline underline-offset-8"> |
| 51 | + MEDIA PARTNERS |
| 52 | + </h3> |
| 53 | + <div className="flex justify-center items-start flex-wrap gap-[20px]"> |
| 54 | + {mediaPartners |
| 55 | + .sort((a, b) => alphabetSort(a, b)) |
| 56 | + .map((partner, i) => ( |
| 57 | + <a |
| 58 | + key={i} |
| 59 | + className="zoom-partner flex flex-col items-center text-center w-full h-full" |
| 60 | + href={partner.link} |
| 61 | + target="_blank" |
| 62 | + > |
| 63 | + <partner.iconPath /> |
| 64 | + </a> |
| 65 | + ))} |
| 66 | + </div> |
| 67 | + <h3 className="text-center text-[--rhodamine] font-bold my-20 underline underline-offset-8"> |
| 68 | + COMMUNITY PARTNERS |
| 69 | + </h3> |
| 70 | + <div className="flex justify-center items-start flex-wrap gap-[20px]"> |
| 71 | + {communityPartners |
| 72 | + .sort((a, b) => alphabetSort(a, b)) |
| 73 | + .map((partner, i) => ( |
| 74 | + <a |
| 75 | + key={i} |
| 76 | + className="zoom-partner flex flex-col items-center text-center w-full h-full" |
| 77 | + href={partner.link} |
| 78 | + target="_blank" |
| 79 | + > |
| 80 | + <partner.iconPath /> |
| 81 | + </a> |
| 82 | + ))} |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + ) |
| 86 | +} |
| 87 | + |
| 88 | +export default PartnersConf |
0 commit comments