import { getCollection, getMetaobjectsByIds } from 'lib/shopify'; import Link from 'next/link'; const LinkItem = async ({ collectionLinkId, anchorText }: { collectionLinkId: string; anchorText: string; }) => { const collection = await getCollection({ id: collectionLinkId }); if (!collection) return null; return ( {anchorText} ); }; const HelpfulLinks = async ({ collection }: { collection: string }) => { const collectionData = await getCollection({ handle: collection }); if (!collectionData || !collectionData.helpfulLinks) return null; const helpfulLinks = await getMetaobjectsByIds(collectionData.helpfulLinks); return (