File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/components/ui/coaching-sessions/coaching-notes Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ export const Toolbar = () => {
2222 const { editor } = useCurrentEditor ( ) ;
2323 const [ isLinkDialogOpen , setIsLinkDialogOpen ] = useState ( false ) ;
2424
25- if ( ! editor ) {
26- return null ;
27- }
28- // Add keyboard shortcut handler
2925 useEffect ( ( ) => {
3026 const handleKeyDown = ( e : KeyboardEvent ) => {
3127 if ( ( e . metaKey || e . ctrlKey ) && e . key === "k" && editor ?. isFocused ) {
@@ -38,6 +34,11 @@ export const Toolbar = () => {
3834 return ( ) => document . removeEventListener ( "keydown" , handleKeyDown ) ;
3935 } , [ editor ] ) ;
4036
37+ if ( ! editor ) {
38+ return null ;
39+ }
40+ // Add keyboard shortcut handler
41+
4142 return (
4243 < >
4344 < div className = "flex items-center gap-0 mt-1 mx-1 mb-0" >
You can’t perform that action at this time.
0 commit comments