From 097604fed5001d5d7dd1ab03a93fcd8f15fbd9cb Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Fri, 4 Aug 2023 23:35:57 +0900 Subject: [PATCH] feat(tags): show number of count --- components/tag.tsx | 2 +- models/tag.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/tag.tsx b/components/tag.tsx index ff2d974..b2f46c8 100644 --- a/components/tag.tsx +++ b/components/tag.tsx @@ -19,7 +19,7 @@ const TagComponent: React.FunctionComponent<{ tag: Tag, className: string | null className={className ? className : null} target="_blank" data-tag={tag.name.toLowerCase()}> - {`${tag.name}`} + {`${tag.name} (${tag.count})`} ); } diff --git a/models/tag.ts b/models/tag.ts index 5a7b878..fb3d5b8 100644 --- a/models/tag.ts +++ b/models/tag.ts @@ -1,4 +1,5 @@ export interface Tag { id: string, - name: string + name: string, + count: number }