Skip to content

Commit

Permalink
feat: Updated 2 files
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-nightly[bot] committed Apr 23, 2024
1 parent 9e3bc3d commit 63a4ba0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/CallToAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { loadConfettiPreset } from "tsparticles-preset-confetti";
import { useState } from "react";
import logo from "../assets/icon.png";

import { faDiscord } from "@fortawesome/free-brands-svg-icons";
import ExternalLinkWithText from "./ExternalLinkWithText";
import { TypeAnimation } from "react-type-animation";
const demo = require("../assets/demo.mp4");
Expand Down Expand Up @@ -136,15 +137,16 @@ export default function CallToAction() {
</Button>
<ExternalLinkWithText
href="https://community.sweep.dev/"
color="purple.400"
color="purple.400"
mt="0 !important"
style={{
display: "flex",
flexDirection: "row",
alignItems: "center",
}}
emoji={faDiscord}
>
&nbsp;&nbsp;Join our community
&nbsp;&nbsp;Join our community
</ExternalLinkWithText>
<Flex w={"full"} mt="4rem !important">
<Container width="100vw" boxShadow="0 0 80px #181818" p={0} maxWidth="full">
Expand Down
7 changes: 6 additions & 1 deletion src/components/ExternalLinkWithText.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { ExternalLinkIcon } from "@chakra-ui/icons";
import { Link, LinkProps } from "@chakra-ui/react";

import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { IconDefinition } from "@fortawesome/fontawesome-common-types";

type ExternalLinkWithTextProps = {
children: React.ReactNode,
href: string
includeIcon?: boolean
includeIcon?: boolean,
emoji?: IconDefinition
} & LinkProps;

export default function ExternalLinkWithText({ children, href, includeIcon = true, ...rest }: ExternalLinkWithTextProps) : JSX.Element {
return (
<Link href={href} isExternal rel="noopener noreferrer" {...rest}>
{emoji && <><FontAwesomeIcon icon={emoji} />&nbsp;</>}
{children}{includeIcon && <>&nbsp;<ExternalLinkIcon /></>}
</Link>
);
Expand Down

0 comments on commit 63a4ba0

Please sign in to comment.