From ee5537bc806f8e1531a82723b9f010d2488698ff Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Tue, 6 Sep 2022 13:41:42 +0300 Subject: [PATCH 1/2] update: email text --- .../ConnectToMakerModal.tsx | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 src/features/Tournaments/pages/MakersPage/ConnectToMakerModal/ConnectToMakerModal.tsx diff --git a/src/features/Tournaments/pages/MakersPage/ConnectToMakerModal/ConnectToMakerModal.tsx b/src/features/Tournaments/pages/MakersPage/ConnectToMakerModal/ConnectToMakerModal.tsx new file mode 100644 index 0000000..ff10ea2 --- /dev/null +++ b/src/features/Tournaments/pages/MakersPage/ConnectToMakerModal/ConnectToMakerModal.tsx @@ -0,0 +1,88 @@ +import { motion } from 'framer-motion' +import { ModalCard, modalCardVariants } from 'src/Components/Modals/ModalsContainer/ModalsContainer' +import { FiGithub, FiLinkedin, FiMail, FiTwitter } from "react-icons/fi"; +import { IoClose } from 'react-icons/io5'; +import { GetMakersInTournamentQuery } from 'src/graphql'; +import Avatar from 'src/features/Profiles/Components/Avatar/Avatar'; +import { withHttp } from 'src/utils/helperFunctions'; + + +interface Props extends ModalCard { + maker: GetMakersInTournamentQuery['getMakersInTournament']['makers'][number] +} + +export default function LinkingAccountModal({ onClose, direction, maker, ...props }: Props) { + + + const links = [ + { + hasValue: maker.email, + text: maker.email?.replace(/(^\w+:|^)\/\//, '').replace(/\/$/, ""), + icon: FiMail, + colors: "bg-violet-100 text-violet-900", + url: maker.email && `mailto:${maker.email}` + }, + { + hasValue: maker.twitter, + text: maker.twitter, + icon: FiTwitter, + colors: "bg-blue-100 text-blue-500", + url: `https://twitter.com/@${maker.twitter}` + }, + { + hasValue: maker.github, + text: maker.github, + icon: FiGithub, + colors: "bg-pink-100 text-pink-600", + url: `https://github.com/${maker.github}` + }, + { + hasValue: maker.linkedin, + text: "LinkedIn", + icon: FiLinkedin, + colors: "bg-sky-100 text-cyan-600", + url: maker.linkedin && withHttp(maker.linkedin), + } + ]; + + + return ( + +
+ +

Send team request 🤝

+
+
+
+ +
+

{maker.name}

+

{maker.jobTitle}

+
+ +

Team up with this maker by sending them a message on one of the following platforms.

+
+ {links.filter(link => link.hasValue).map((link, idx) => + + + )} +
+
+
+ ) +} + + + From ed21e21359bce17fd6adaea1b3baefdae5dc3d14 Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Tue, 6 Sep 2022 13:42:10 +0300 Subject: [PATCH 2/2] update: email regex --- src/features/Profiles/pages/ProfilePage/AboutCard/AboutCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/Profiles/pages/ProfilePage/AboutCard/AboutCard.tsx b/src/features/Profiles/pages/ProfilePage/AboutCard/AboutCard.tsx index 6f87f17..70fbc0d 100644 --- a/src/features/Profiles/pages/ProfilePage/AboutCard/AboutCard.tsx +++ b/src/features/Profiles/pages/ProfilePage/AboutCard/AboutCard.tsx @@ -27,7 +27,7 @@ export default function AboutCard({ user, isOwner }: Props) { const links = [ { hasValue: user.email, - text: user.email?.replace(/(^\w+:|^)\/\//, '').replace(/\/$/, ""), + text: user.email, icon: FiMail, colors: "bg-violet-100 text-violet-900", url: user.email && `mailto:${user.email}`