fix(web): make quick start tab icons exhaustive

This commit is contained in:
dongmucat 2026-05-12 14:08:29 +08:00
parent 8931f6d241
commit fed4eeb2b9

View file

@ -1,6 +1,7 @@
import { useState, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Bot, Check, Copy, Terminal, UserRound } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import { useCopyToClipboard } from '@/shared/lib/clipboard'
type LandingQuickStartTabId = 'agent' | 'human' | 'cli'
@ -12,6 +13,12 @@ interface LandingQuickStartTab {
command: string
}
const tabIcons: Record<LandingQuickStartTabId, LucideIcon> = {
agent: Bot,
human: UserRound,
cli: Terminal,
}
/**
* Get the base URL for the application.
* Prefers the runtime config if set and not localhost.
@ -115,7 +122,7 @@ export function LandingQuickStartSection() {
>
{tabs.map((tab) => {
const isActive = tab.id === currentTab.id
const Icon = tab.id === 'agent' ? Bot : tab.id === 'human' ? UserRound : Terminal
const Icon = tabIcons[tab.id]
return (
<button