Skip to content

Commit

Permalink
feat: success page
Browse files Browse the repository at this point in the history
  • Loading branch information
carhartlewis committed Feb 21, 2025
1 parent 9124cfc commit 741f531
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion apps/web/src/app/(home)/success/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ export default function SuccessPage() {
<div className="container mx-auto px-4 py-16 md:py-24">
<div className="flex flex-col items-center space-y-6">
<Logo />

<h1 className="max-w-[900px] text-4xl font-semibold leading-tight tracking-tighter lg:leading-[1.1] mx-auto">
<Balancer>Thank you 🎉</Balancer>
</h1>
<p className="text-lg md:text-xl font-light text-muted-foreground mt-6 mx-auto max-w-[800px]">

<p className="text-center text-lg md:text-xl font-light text-muted-foreground mt-6 mx-auto max-w-[800px]">
<Balancer>
We'll be in touch when we're close to launching. In the
meantime, join us on the community{" "}
Expand Down
6 changes: 1 addition & 5 deletions apps/web/src/app/actions/waitlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ export const joinWaitlist = createSafeActionClient()
},
});
}
if (process.env.ZAP_WEBHOOK_URL) {
const zapPayload: ZapSubscriberPayload = {
email_address: parsedInput.email,
referrer: typeof window !== 'undefined' ? window.location.href : 'https://trycomp.ai',
};

if (process.env.ZAP_WEBHOOK_URL) {
await ky.post(
process.env.ZAP_WEBHOOK_URL as string,
{
Expand Down
8 changes: 5 additions & 3 deletions apps/web/src/app/components/waitlist-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ import { Input } from "@bubba/ui/input";
import { zodResolver } from "@hookform/resolvers/zod";
import { ArrowRight, Loader2 } from "lucide-react";
import { useAction } from "next-safe-action/hooks";
import Link from "next/link";
import { redirect } from "next/navigation";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import type { z } from "zod";

export function WaitlistForm() {
const [isSent, setSent] = useState(false);
const router = useRouter();

const waitlistAction = useAction(joinWaitlist, {
onSuccess: () => {
onSuccess: async () => {
setSent(true);
toast.success("Thanks, you're on the list!");
form.reset();
await router.push("/success");
},
onError: () => {
toast.error(
Expand Down

0 comments on commit 741f531

Please sign in to comment.