import { getCollection, getMetaobjectsByIds } from 'lib/shopify';
import { Suspense } from 'react';
import CollectionLink from './collection-link';
const HelpfulLinks = async ({ ids }: { ids: string[] | null }) => {
if (!ids?.length) return null;
const links = await getMetaobjectsByIds(ids);
return (
{links.map((link) => (
))}
);
};
const HelpfulLinksPlaceholder = () => {
return (
);
};
const Header = async ({ collection }: { collection: string }) => {
const collectionData = await getCollection({ handle: collection });
return collectionData ? (
<>
{collectionData.title}
{collectionData.description}
}>
>
) : null;
};
export const HeaderPlaceholder = () => {
return (
);
};
export default Header;