import { LinkIncludingShortenedCollectionAndTags } from "@/types/global"; import AddOrEditLink from "./AddOrEditLink"; import PreservedFormats from "./PreservedFormats"; type Props = | { toggleLinkModal: Function; method: "CREATE"; activeLink?: LinkIncludingShortenedCollectionAndTags; className?: string; } | { toggleLinkModal: Function; method: "UPDATE"; activeLink: LinkIncludingShortenedCollectionAndTags; className?: string; } | { toggleLinkModal: Function; method: "FORMATS"; activeLink: LinkIncludingShortenedCollectionAndTags; className?: string; }; export default function LinkModal({ className, toggleLinkModal, activeLink, method, }: Props) { return (
New Link
)} */} {activeLink && method === "UPDATE" ? ( <>Edit Link
Create a New Link
Manage Preserved Formats