mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 06:49:02 +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
|
style?: React.CSSProperties
|
||||||
}
|
}
|
||||||
|
|
||||||
let _tab: any = ''
|
let _tab: Tab | null = null
|
||||||
|
|
||||||
const HomeTabs: FC<Props> = ({
|
const HomeTabs: FC<Props> = ({
|
||||||
activeAssistant,
|
activeAssistant,
|
||||||
@ -103,7 +103,7 @@ const HomeTabs: FC<Props> = ({
|
|||||||
if (position === 'right' && topicPosition === 'right' && tab === 'assistants') {
|
if (position === 'right' && topicPosition === 'right' && tab === 'assistants') {
|
||||||
setTab('topic')
|
setTab('topic')
|
||||||
}
|
}
|
||||||
if (position === 'left' && topicPosition === 'right' && tab === 'topic') {
|
if (position === 'left' && topicPosition === 'right' && (tab === 'topic' || tab === 'settings')) {
|
||||||
setTab('assistants')
|
setTab('assistants')
|
||||||
}
|
}
|
||||||
}, [position, tab, topicPosition, forceToSeeAllTab])
|
}, [position, tab, topicPosition, forceToSeeAllTab])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user