import * as React from "react" import { useFormContext } from "react-hook-form" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { LaIcon } from "@/components/custom/la-icon" import { LinkFormValues } from "./schema" interface UrlBadgeProps { urlFetched: string | null handleResetUrl: () => void } export const UrlBadge: React.FC = ({ urlFetched, handleResetUrl }) => { const form = useFormContext() if (!urlFetched) return null return (
{form.getValues("url")}
) }