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 (
{/* {method === "CREATE" && (

New Link

)} */} {activeLink && method === "UPDATE" ? ( <>

Edit Link

) : undefined} {method === "CREATE" ? ( <>

Create a New Link

) : undefined} {activeLink && method === "FORMATS" ? ( <>

Manage Preserved Formats

) : undefined}
); }