⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
import {
ArchivedFormat,
LinkIncludingShortenedCollectionAndTags,
} from "@linkwarden/types/global";
const getOriginalFormat = (
link: LinkIncludingShortenedCollectionAndTags
): ArchivedFormat | null => {
if (link.type === "pdf") return ArchivedFormat.pdf;
else if (link.type === "image")
return link.image?.endsWith("png")
? ArchivedFormat.png
: ArchivedFormat.jpeg;
else return null;
};
export default getOriginalFormat;