mirror of https://github.com/kortix-ai/suna.git
fix: hide panel when resetting the state of playback
This commit is contained in:
parent
1fdf26f82e
commit
3be4345cbf
|
@ -110,7 +110,7 @@ export const PlaybackControls = ({
|
|||
if (!isPlaying && !isSidePanelOpen) {
|
||||
onToggleSidePanel();
|
||||
}
|
||||
}, [isPlaying, isSidePanelOpen, onToggleSidePanel]);
|
||||
}, [isPlaying, isSidePanelOpen, onToggleSidePanel, updatePlaybackState]);
|
||||
|
||||
const resetPlayback = useCallback(() => {
|
||||
updatePlaybackState({
|
||||
|
@ -122,7 +122,10 @@ export const PlaybackControls = ({
|
|||
currentToolCall: null,
|
||||
toolPlaybackIndex: -1,
|
||||
});
|
||||
}, [updatePlaybackState]);
|
||||
if (isSidePanelOpen) {
|
||||
onToggleSidePanel();
|
||||
}
|
||||
}, [updatePlaybackState, isSidePanelOpen, onToggleSidePanel]);
|
||||
|
||||
const skipToEnd = useCallback(() => {
|
||||
updatePlaybackState({
|
||||
|
|
Loading…
Reference in New Issue