diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-06 20:45:29 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-06 20:45:29 +0200 |
| commit | 40c7fbb4f86130c83fbd9029e83c5e7550e3219d (patch) | |
| tree | 054d918d282358c084f4fc08462913833de644a5 /apps/web/src/components/landing/hero.tsx | |
| parent | 0e32c732ddc335d35e6a7f8547f4af68bfd9c369 (diff) | |
| download | opencut-40c7fbb4f86130c83fbd9029e83c5e7550e3219d.tar.gz | |
refactor: move to a typed-tracks system and add support for text
Diffstat (limited to 'apps/web/src/components/landing/hero.tsx')
| -rw-r--r-- | apps/web/src/components/landing/hero.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/src/components/landing/hero.tsx b/apps/web/src/components/landing/hero.tsx index aac63e94..113d7579 100644 --- a/apps/web/src/components/landing/hero.tsx +++ b/apps/web/src/components/landing/hero.tsx @@ -4,7 +4,6 @@ import { motion } from "motion/react"; import { Button } from "../ui/button"; import { Input } from "../ui/input"; import { ArrowRight } from "lucide-react"; -import Link from "next/link"; import { useState } from "react"; import { useToast } from "@/hooks/use-toast"; @@ -42,7 +41,7 @@ export function Hero({ signupCount }: HeroProps) { body: JSON.stringify({ email: email.trim() }), }); - const data = await response.json(); + const data = (await response.json()) as { error: string }; if (response.ok) { toast({ @@ -53,7 +52,9 @@ export function Hero({ signupCount }: HeroProps) { } else { toast({ title: "Oops!", - description: data.error || "Something went wrong. Please try again.", + description: + (data as { error: string }).error || + "Something went wrong. Please try again.", variant: "destructive", }); } |
