From 065376b75a1949ed6394da66a3f9b179268e2d38 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Mon, 23 Nov 2026 03:25:56 +0900 Subject: [PATCH] Remove unused BlogAuthorFilter component --- knip.jsonc | 1 - src/components/BlogAuthorFilter.tsx | 133 ---------------------------- 2 files changed, 134 deletions(-) delete mode 100644 src/components/BlogAuthorFilter.tsx diff --git a/knip.jsonc b/knip.jsonc index 1a61fa857..dc89df6ca 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -28,7 +28,6 @@ "src/chat/preferences.functions.ts", "src/chat/server/semantic-history.ts", "src/chat/skill-identifiers.ts", - "src/components/BlogAuthorFilter.tsx", "src/components/BottomCTA.tsx", "src/components/DocFeedbackContext.tsx", "src/components/FrameworkIconTabs.tsx", diff --git a/src/components/BlogAuthorFilter.tsx b/src/components/BlogAuthorFilter.tsx deleted file mode 100644 index 28341357d..000000000 --- a/src/components/BlogAuthorFilter.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { CheckIcon, CaretUpDownIcon } from '@phosphor-icons/react' -import { twMerge } from 'tailwind-merge' -import { - Dropdown, - DropdownContent, - DropdownItem, - DropdownSeparator, - DropdownTrigger, -} from '~/components/Dropdown' -import { findMaintainerByAuthorName } from '~/utils/authors' -import authorFallbackAvatar from '~/images/author-fallback.svg' - -function getAuthorAvatar(name: string): string { - return findMaintainerByAuthorName(name)?.avatar ?? authorFallbackAvatar -} - -type BlogAuthorFilterProps = { - authors: string[] - selected: string | undefined - onSelect: (author: string | undefined) => void - className?: string -} - -export function BlogAuthorFilter({ - authors, - selected, - onSelect, - className, -}: BlogAuthorFilterProps) { - // Ignore URL values that don't correspond to a real author in the list. - const activeAuthor = - selected && authors.includes(selected) ? selected : undefined - - return ( -
- - - - - - onSelect(undefined)} - className={twMerge( - 'pr-8 relative', - !activeAuthor - ? 'bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-200 font-medium' - : 'font-normal', - )} - > - All authors - {!activeAuthor ? ( - - {authors.length > 0 ? : null} - {authors.map((name) => { - const isSelected = activeAuthor === name - return ( - onSelect(name)} - className={twMerge( - 'pr-8 pl-2 relative', - isSelected - ? 'bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-200 font-medium' - : 'font-normal', - )} - > - - {name} - {isSelected ? ( - - ) - })} - - -
- ) -}