个股论坛重做
This commit is contained in:
@@ -623,18 +623,11 @@ const ChannelSidebar: React.FC<ChannelSidebarProps> = ({
|
||||
'& option[value=""]': { color: 'gray.500' },
|
||||
}}
|
||||
>
|
||||
{categories
|
||||
.filter(cat => !cat.isSystem) // 过滤掉系统分类
|
||||
.map(category => (
|
||||
<option key={category.id} value={category.id}>
|
||||
{category.icon} {category.name}
|
||||
</option>
|
||||
))
|
||||
}
|
||||
{/* 如果没有用户分类,显示默认选项 */}
|
||||
{categories.filter(cat => !cat.isSystem).length === 0 && (
|
||||
<option value="" disabled>暂无可用分类</option>
|
||||
)}
|
||||
{categories.map(category => (
|
||||
<option key={category.id} value={category.id}>
|
||||
{category.icon} {category.name}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user