mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-27 11:14:59 +00:00
fix(web): make quick start tab icons exhaustive
This commit is contained in:
parent
8931f6d241
commit
fed4eeb2b9
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue