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 = () => {
22
22
const { editor } = useCurrentEditor ( ) ;
23
23
const [ isLinkDialogOpen , setIsLinkDialogOpen ] = useState ( false ) ;
24
24
25
- if ( ! editor ) {
26
- return null ;
27
- }
28
- // Add keyboard shortcut handler
29
25
useEffect ( ( ) => {
30
26
const handleKeyDown = ( e : KeyboardEvent ) => {
31
27
if ( ( e . metaKey || e . ctrlKey ) && e . key === "k" && editor ?. isFocused ) {
@@ -38,6 +34,11 @@ export const Toolbar = () => {
38
34
return ( ) => document . removeEventListener ( "keydown" , handleKeyDown ) ;
39
35
} , [ editor ] ) ;
40
36
37
+ if ( ! editor ) {
38
+ return null ;
39
+ }
40
+ // Add keyboard shortcut handler
41
+
41
42
return (
42
43
< >
43
44
< 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