Catch all routes

This commit is contained in:
Henrik Larsson
2023-08-07 16:40:42 +02:00
parent a75a2e7feb
commit 6527974989
8 changed files with 93 additions and 53 deletions

View File

@@ -14,8 +14,6 @@ interface CardProps {
imageFormat?: 'square' | 'portrait' | 'landscape';
}
const placeholderImg = '/product-img-placeholder.svg';
const Card: FC<CardProps> = ({ className, title, image, link, text, imageFormat = 'square' }) => {
const rootClassName = cn('relative', className);
@@ -39,7 +37,7 @@ const Card: FC<CardProps> = ({ className, title, image, link, text, imageFormat
} else if (type === 'category') {
href = `/category/${link.internalLink.reference.slug.current}`;
} else {
return `${link.internalLink.reference.slug.current}`;
href = `${link.internalLink.reference.slug.current}`;
}
return (