diff --git a/components/home/HeroSection.tsx b/components/home/HeroSection.tsx new file mode 100644 index 0000000..9709a2e --- /dev/null +++ b/components/home/HeroSection.tsx @@ -0,0 +1,61 @@ +import Image from 'next/image' +import Link from 'next/link' +import { getAssetUrl } from '@/lib/directus' +import type { Article } from '@/lib/types' + +interface Props { + article: Article +} + +export default function HeroSection({ article }: Props) { + const href = `/${article.category.slug}/${article.slug}` + + return ( +
+
+
+ {article.featured_image ? ( + {article.title} + ) : ( +
+ )} +
+ +
+
+ + Featured + + + {article.category.name} + +
+ +

+ {article.title} +

+ + {article.excerpt && ( +

+ {article.excerpt} +

+ )} + + + Read article → + +
+
+
+ ) +}