From 2b77ef3413f65abed6d8fa08d5005ef58cc16616 Mon Sep 17 00:00:00 2001 From: KMKoushik Date: Wed, 15 May 2024 19:24:09 +1000 Subject: [PATCH] Remove animation from home page --- apps/marketing/src/app/page.tsx | 198 +++--------------- .../(dashboard)/domains/[domainId]/page.tsx | 53 +---- packages/ui/src/text-with-copy.tsx | 38 ++++ 3 files changed, 75 insertions(+), 214 deletions(-) create mode 100644 packages/ui/src/text-with-copy.tsx diff --git a/apps/marketing/src/app/page.tsx b/apps/marketing/src/app/page.tsx index f0bbe56..b8a7812 100644 --- a/apps/marketing/src/app/page.tsx +++ b/apps/marketing/src/app/page.tsx @@ -20,6 +20,7 @@ import { } from "lucide-react"; import { formatDate } from "date-fns"; import { Code } from "@unsend/ui/src/code"; +import { TextWithCopyButton } from "@unsend/ui/src/text-with-copy"; import Link from "next/link"; import Image from "next/image"; @@ -236,19 +237,7 @@ export default function Home() {
- +
- - +
+
- +
@@ -337,115 +315,37 @@ export default function Home() {
- +
- +
- - +
+
- - +
+
- - +
+
- - +
+
- - +
+
- - +
+
- - +
+
- - +
+
- +
- +
Welcome to unsend!

@@ -453,53 +353,11 @@ export default function Home() { Sendgrid and postmark.

- - -
-
-
-
-
- -

SMS & Push notification

+
-
- -
- {"Coming soon!".split("").map((l, i) => ( - - {l} - - ))} -
-
-
+

Integrate in minutes @@ -548,7 +406,7 @@ export default function Home() {

- Email: hello@unsend.dev +
{/* diff --git a/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx b/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx index 5d322b2..a468109 100644 --- a/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx +++ b/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx @@ -19,8 +19,7 @@ import { TableHeader, TableRow, } from "@unsend/ui/src/table"; -import { Button } from "@unsend/ui/src/button"; -import { CheckIcon, ClipboardCopy } from "lucide-react"; +import { TextWithCopyButton } from "@unsend/ui/src/text-with-copy"; import React from "react"; import { Switch } from "@unsend/ui/src/switch"; import DeleteDomain from "./delete-domain"; @@ -90,12 +89,12 @@ export default function DomainItemPage({ MX - - @@ -114,12 +113,12 @@ export default function DomainItemPage({ TXT - - @@ -135,12 +134,12 @@ export default function DomainItemPage({ TXT - - @@ -156,12 +155,12 @@ export default function DomainItemPage({ TXT - - @@ -188,40 +187,6 @@ export default function DomainItemPage({ ); } -const InputWithCopyButton: React.FC<{ value: string; className?: string }> = ({ - value, - className, -}) => { - const [isCopied, setIsCopied] = React.useState(false); - - const copyToClipboard = async () => { - try { - await navigator.clipboard.writeText(value); - setIsCopied(true); - setTimeout(() => setIsCopied(false), 2000); // Reset isCopied to false after 2 seconds - } catch (err) { - console.error("Failed to copy: ", err); - } - }; - - return ( -
-
{value}
- -
- ); -}; - const DomainSettings: React.FC<{ domain: Domain }> = ({ domain }) => { const updateDomain = api.domain.updateDomain.useMutation(); const utils = api.useUtils(); diff --git a/packages/ui/src/text-with-copy.tsx b/packages/ui/src/text-with-copy.tsx new file mode 100644 index 0000000..a90977f --- /dev/null +++ b/packages/ui/src/text-with-copy.tsx @@ -0,0 +1,38 @@ +"use client"; +import React from "react"; +import { Button } from "./button"; +import { CheckIcon, ClipboardCopy } from "lucide-react"; + +export const TextWithCopyButton: React.FC<{ + value: string; + className?: string; +}> = ({ value, className }) => { + const [isCopied, setIsCopied] = React.useState(false); + + const copyToClipboard = async () => { + try { + await navigator.clipboard.writeText(value); + setIsCopied(true); + setTimeout(() => setIsCopied(false), 2000); // Reset isCopied to false after 2 seconds + } catch (err) { + console.error("Failed to copy: ", err); + } + }; + + return ( +
+
{value}
+ +
+ ); +};