diff --git a/src/app/components/SelectedTagsSection.tsx b/src/app/components/SelectedTagsSection.tsx index 2f4525c..9a320a9 100644 --- a/src/app/components/SelectedTagsSection.tsx +++ b/src/app/components/SelectedTagsSection.tsx @@ -2,8 +2,9 @@ import React, { FC, useMemo } from "react"; import { Tag, Typography, Space, theme } from "antd"; import { normalizeString } from "@/app/utils/normalizeString"; import { TagItem } from "./types"; +import { useTheme } from "next-themes"; -const { Title, Text } = Typography; +const { Text } = Typography; interface SelectedTagsSectionProps { selectedTags: TagItem[]; @@ -12,7 +13,7 @@ interface SelectedTagsSectionProps { const SelectedTagsSection: FC = ({ selectedTags = [], onTagClick }) => { // Get the current theme token - const { token } = theme.useToken(); + const { theme } = useTheme(); // Group tags by object and attribute const tagsByObjectAndAttribute = useMemo(() => { @@ -34,15 +35,15 @@ const SelectedTagsSection: FC = ({ selectedTags = [], } return ( -
+
{Object.entries(tagsByObjectAndAttribute).map(([object, tagsByAttribute]) => (
- + <Text strong className={`mb-2 text-gray-400`}> {object} - + {Object.entries(tagsByAttribute).map(([attribute, tags]) => (
- + {attribute}: @@ -54,15 +55,12 @@ const SelectedTagsSection: FC = ({ selectedTags = [], return ( onTagClick(tag)} className="flex items-center cursor-pointer hover:opacity-80 transition-opacity" style={{ display: "inline-flex", alignItems: "center", - backgroundColor: token.colorPrimaryBg, - borderColor: token.colorPrimaryBorder, - color: token.colorPrimaryText, }}> {tagDisplayName}