From f328dbd8b380ae8b3e8fa677fad9f5facd26a63c Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Fri, 13 Dec 2019 09:20:31 +0700 Subject: [PATCH] Count the number of patterns --- client/pages/ExplorePage.tsx | 3 ++- client/pages/HomePage.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index 664a284..37586ef 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -10,6 +10,7 @@ import ProductHuntBadge from '../layouts/ProductHuntBadge'; const ExplorePage = () => { useDocumentTitle('CSS Layout ∙ Explore'); + const numPatterns = Object.keys(Pattern).length; return ( @@ -62,7 +63,7 @@ const ExplorePage = () => { textAlign: 'center', }} > - Here is the collection of 67 patterns + Here is the collection of {numPatterns} patterns
All covers you see in this page are made with CSS only. Inspect them! 🎉 diff --git a/client/pages/HomePage.tsx b/client/pages/HomePage.tsx index 7fe2d86..274c508 100644 --- a/client/pages/HomePage.tsx +++ b/client/pages/HomePage.tsx @@ -12,6 +12,7 @@ import MadeOf from './MadeOf'; const HomePage = () => { useDocumentTitle('CSS Layout'); + const numPatterns = Object.keys(Pattern).length; return ( @@ -170,7 +171,7 @@ const HomePage = () => { marginBottom: '16px', }} > - 67 patterns + {numPatterns} patterns