From 345c347a56070d0b0d2b72656df891eec6a1f7ab Mon Sep 17 00:00:00 2001
From: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Date: Fri, 23 Feb 2024 01:51:07 +0000
Subject: [PATCH] chore: passing additional buildCtx to componentData (#914)
---
quartz/components/TagList.tsx | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/quartz/components/TagList.tsx b/quartz/components/TagList.tsx
index b39b199..04a483b 100644
--- a/quartz/components/TagList.tsx
+++ b/quartz/components/TagList.tsx
@@ -1,12 +1,13 @@
import { pathToRoot, slugTag } from "../util/path"
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
-function TagList({ fileData, displayClass }: QuartzComponentProps) {
+const TagList: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
const tags = fileData.frontmatter?.tags
const baseDir = pathToRoot(fileData.slug!)
if (tags && tags.length > 0) {
return (
- <ul class={`tags ${displayClass ?? ""}`}>
+ <ul class={classNames(displayClass, "tags")}>
{tags.map((tag) => {
const display = `#${tag}`
const linkDest = baseDir + `/tags/${slugTag(tag)}`
--
Gitblit v1.10.0