@@ -34,7 +34,6 @@ export function NoteEditor({ note, isMobile = false, isKeyboardVisible = false,
3434 setContent ( note . content || '' ) ;
3535 } , [ note ] ) ;
3636
37- // Initialize crypto if needed
3837 useEffect ( ( ) => {
3938 const initCrypto = async ( ) => {
4039 try {
@@ -50,13 +49,9 @@ export function NoteEditor({ note, isMobile = false, isKeyboardVisible = false,
5049 initCrypto ( ) ;
5150 } , [ ] ) ;
5251
53- // Update the useEffect that handles body overflow
5452 useEffect ( ( ) => {
5553 if ( isMobile ) {
56- // Prevent body scrolling when editor is open on mobile
5754 document . body . style . overflow = 'hidden' ;
58-
59- // Add a class to help with mobile styling
6055 document . body . classList . add ( 'editor-open' ) ;
6156
6257 return ( ) => {
@@ -161,11 +156,12 @@ export function NoteEditor({ note, isMobile = false, isKeyboardVisible = false,
161156
162157 < Box className = "editor-container" style = { {
163158 flex : 1 ,
164- border : '1px solid var(--mantine-color-gray-3)' ,
165- borderRadius : '8px' ,
166159 overflow : 'hidden' ,
167160 backgroundColor : 'var(--mantine-color-body)' ,
168- position : 'relative'
161+ position : 'relative' ,
162+ display : 'flex' ,
163+ flexDirection : 'column' ,
164+ paddingBottom : '70px'
169165 } } >
170166 < MarkdownEditor
171167 content = { content }
@@ -256,17 +252,19 @@ export function NoteEditor({ note, isMobile = false, isKeyboardVisible = false,
256252 </ Box >
257253 </ >
258254 ) }
259- < Paper withBorder radius = "md" p = "md" mb = "md" >
260- < Group justify = "space-between" >
261- < Stack gap = { 4 } >
262- < Text size = "sm" fw = { 500 } > Last edited: { format ( note . updated_at , 'MMM d, yyyy h:mm a' ) } </ Text >
263- { getEncryptionBadge ( ) }
264- </ Stack >
265- < ActionIcon color = "red" onClick = { handleDelete } >
266- < IconTrash size = { 18 } />
267- </ ActionIcon >
268- </ Group >
269- </ Paper >
255+ { ! isMobile && (
256+ < Paper withBorder radius = "md" p = "md" mb = "md" >
257+ < Group justify = "space-between" >
258+ < Stack gap = { 4 } >
259+ < Text size = "sm" fw = { 500 } > Last edited: { format ( note . updated_at , 'MMM d, yyyy h:mm a' ) } </ Text >
260+ { getEncryptionBadge ( ) }
261+ </ Stack >
262+ < ActionIcon color = "red" onClick = { handleDelete } >
263+ < IconTrash size = { 18 } />
264+ </ ActionIcon >
265+ </ Group >
266+ </ Paper >
267+ ) }
270268 </ Box >
271269 ) ;
272270}
0 commit comments