{Object.entries(allTags).map(([tagName, tagCount], idx) => {
+ if (tagCount <= 1) return null
+
const name = `${tagName} (${tagCount})`
const isActive = selectedTags.includes(tagName)
return (
@@ -374,11 +376,9 @@ const TutorialPage = ({
)}
{tutorial.description}
- {(tutorial.tags ?? []).length > 1 && (
-
-
-
- )}
+
+
+
)
})}
From 4d89a7a71c4928651dbc3d294574eb4a14802941 Mon Sep 17 00:00:00 2001
From: Joshua <62268199+minimalsm@users.noreply.github.com>
Date: Wed, 12 Mar 2025 16:37:26 +0000
Subject: [PATCH 3/3] Make typescript overlords happy
---
src/pages/[locale]/developers/tutorials.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/[locale]/developers/tutorials.tsx b/src/pages/[locale]/developers/tutorials.tsx
index d9c7552d386..1d483a7929d 100644
--- a/src/pages/[locale]/developers/tutorials.tsx
+++ b/src/pages/[locale]/developers/tutorials.tsx
@@ -288,7 +288,7 @@ const TutorialPage = ({
{Object.entries(allTags).map(([tagName, tagCount], idx) => {
- if (tagCount <= 1) return null
+ if ((tagCount as number) <= 1) return null
const name = `${tagName} (${tagCount})`
const isActive = selectedTags.includes(tagName)