mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
fix(home-tabs): correct tab switching logic for left position (#10858)
Ensure proper tab switching when position is left and topicPosition is right by including 'settings' tab in the condition
This commit is contained in:
parent
f58d2e2e52
commit
c021947d52
@ -29,7 +29,7 @@ interface Props {
|
||||
style?: React.CSSProperties
|
||||
}
|
||||
|
||||
let _tab: any = ''
|
||||
let _tab: Tab | null = null
|
||||
|
||||
const HomeTabs: FC<Props> = ({
|
||||
activeAssistant,
|
||||
@ -103,7 +103,7 @@ const HomeTabs: FC<Props> = ({
|
||||
if (position === 'right' && topicPosition === 'right' && tab === 'assistants') {
|
||||
setTab('topic')
|
||||
}
|
||||
if (position === 'left' && topicPosition === 'right' && tab === 'topic') {
|
||||
if (position === 'left' && topicPosition === 'right' && (tab === 'topic' || tab === 'settings')) {
|
||||
setTab('assistants')
|
||||
}
|
||||
}, [position, tab, topicPosition, forceToSeeAllTab])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user