mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 04:31:27 +08:00
fix(home-tabs): correct conditional rendering of topic and settings tabs
Ensure tabs are only shown when isTopicView is true and simplify the tab labels by removing conditional rendering
This commit is contained in:
parent
77351b7691
commit
14f14b75b0
@ -124,16 +124,14 @@ const HomeTabs: FC<Props> = ({
|
||||
</CustomTabs>
|
||||
)}
|
||||
|
||||
{position === 'right' && topicPosition === 'right' && (
|
||||
{position === 'right' && topicPosition === 'right' && isTopicView && (
|
||||
<CustomTabs>
|
||||
<TabItem active={tab === 'topic'} onClick={() => setTab('topic')}>
|
||||
{isTopicView ? t('common.topics') : t('agent.session.label_other')}
|
||||
{t('common.topics')}
|
||||
</TabItem>
|
||||
<TabItem active={tab === 'settings'} onClick={() => setTab('settings')}>
|
||||
{t('settings.title')}
|
||||
</TabItem>
|
||||
{shouldShowSettingsTab && (
|
||||
<TabItem active={tab === 'settings'} onClick={() => setTab('settings')}>
|
||||
{t('settings.title')}
|
||||
</TabItem>
|
||||
)}
|
||||
</CustomTabs>
|
||||
)}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user