import React from "react"; import styles from "./SocialLinks.module.css"; interface Props { color: "white" | "gradient" | "blue"; size: "small" | "big"; } export const SocialLinks: React.FC = (props) => { return (
{links.map((Link, index) => ( ))}
); }; const iconList = [ { name: "Facebook", image: FacebookSvg, link: "https://www.facebook.com/uw.computerscienceclub", }, { name: "Instagram", image: InstagramSvg, link: "https://www.instagram.com/uwcsclub/", }, { name: "Twitch", image: TwitchSvg, link: "https://www.twitch.tv/uwcsclub", }, { name: "Discord", image: DiscordSvg, link: "https://discord.gg/pHfYBCg", }, { name: "Libera", image: LiberaSvg, link: "ircs://irc.libera.chat:6697/csc", }, ]; const links = iconList.map((icon) => { function SocialLink({ size, color }: Props) { return ( {icon.image(color)} ); } SocialLink.displayName = icon.name; return SocialLink; }); export const [Facebook, Instagram, Twitch, Discord, Libera] = links; function InstagramSvg(color: string) { return ( ); } function DiscordSvg(color: string) { return ( ); } function TwitchSvg(color: string) { return ( ); } function FacebookSvg(color: string) { return ( ); } function LiberaSvg(color: string) { return ( ); }