import { clsxm } from '@afilmory/utils' import { NavLink } from 'react-router' const SETTINGS_TABS = [ { id: 'general', label: '通用设置', path: '/settings', end: true, }, { id: 'storage', label: '素材存储', path: '/settings/storage', end: false, }, ] as const interface SettingsNavigationProps { active: (typeof SETTINGS_TABS)[number]['id'] } export const SettingsNavigation = ({ active }: SettingsNavigationProps) => { return (
{SETTINGS_TABS.map((tab) => ( {({ isActive }) => { const selected = isActive || active === tab.id return ( {tab.label} ) }} ))}
) }