From ea1cc717c36a0945358d3e42f33c3d3358483f42 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 3 May 2022 12:06:10 -0400 Subject: [PATCH] display full category --- web/components/tags-list.tsx | 6 +++++- web/pages/create.tsx | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/components/tags-list.tsx b/web/components/tags-list.tsx index 5a2b2477..4a55051e 100644 --- a/web/components/tags-list.tsx +++ b/web/components/tags-list.tsx @@ -1,4 +1,5 @@ import clsx from 'clsx' +import { CATEGORIES } from '../../common/categories' import { Col } from './layout/col' import { Row } from './layout/row' @@ -6,6 +7,9 @@ import { SiteLink } from './site-link' function Hashtag(props: { tag: string; noLink?: boolean }) { const { tag, noLink } = props + const category = CATEGORIES[tag.replace('#', '').toLowerCase()] + console.log(tag, category) + const body = (
- {tag} + {category ?? tag}
) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index c0d2cdac..e885d4a6 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -213,9 +213,7 @@ export function NewContract(props: { question: string; tag?: string }) {