From 037fa4e92b94c7393045d795978079358acc9952 Mon Sep 17 00:00:00 2001 From: Maximus Date: Fri, 19 Aug 2022 16:49:46 +0300 Subject: [PATCH] added featured categories section --- src/components/parts/FeaturedArticles.tsx | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/components/parts/FeaturedArticles.tsx diff --git a/src/components/parts/FeaturedArticles.tsx b/src/components/parts/FeaturedArticles.tsx new file mode 100644 index 0000000..62cb623 --- /dev/null +++ b/src/components/parts/FeaturedArticles.tsx @@ -0,0 +1,60 @@ +import React, { useMemo } from "react"; +import Typography from "components/typography/Typography"; +import CategoryCard from "components/Cards/CategoryCard"; +import { + SVGMedicine, + SVGAgricultural, + SVGHumanitarian, + SVGSocials, + SVGTechnicsAndTechology, + SVGFundamental, +} from "components/icons"; + +const categories = [ + { id: 1, title: "Medical", count: 5617813, icon: }, + { + id: 2, + title: "Technics and Technology", + count: 5617813, + icon: , + }, + { id: 3, title: "Fundamental", count: 5617813, icon: }, + { id: 4, title: "Humanitarian", count: 5617813, icon: }, + { id: 5, title: "Argicultural", count: 5617813, icon: }, + { id: 6, title: "Social", count: 5617813, icon: }, +]; + +export function FeaturedArticles() { + const categoryCards = useMemo( + () => + categories.map((category) => ( + + )), + categories + ); + + return ( +
+
+ + Featured articles + + + Select the category of science
+ you are interested in +
+
+
+ {categoryCards} +
+
+ ); +}