Skip to content

Commit

Permalink
Open the menu when we start editing something
Browse files Browse the repository at this point in the history
  • Loading branch information
fallaciousreasoning committed Oct 14, 2024
1 parent 5a11db7 commit 99e89d6
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import styles from './style.module.scss'
import Main from '../main'
import { SidebarHeader } from '../header'
import SidebarNav from '../sidebar_nav'
import FeatureMenu from '../feature_button_menu'
import { useAIChat } from '../../state/ai_chat_context'

export default function FullScreen() {
Expand Down Expand Up @@ -59,6 +58,13 @@ export default function FullScreen() {
}
}

React.useEffect(() => {
const isOpen = asideAnimationRef.current?.playbackRate === 1
if (aiChatContext.editingConversationId && isOpen) {
toggleAside()
}
}, [aiChatContext.editingConversationId, isOpen]);

return (
<div className={styles.fullscreen}>
<div className={styles.left}>
Expand All @@ -79,9 +85,6 @@ export default function FullScreen() {
>
<Icon name='erase' />
</Button>
<FeatureMenu setIsConversationListOpen={function (value: boolean): unknown {
throw new Error('Function not implemented.')
}} />
</>
)}
</div>
Expand Down

0 comments on commit 99e89d6

Please sign in to comment.