File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 88 getFolderPathname ,
99 getNoteTitle ,
1010 getParentFolderPathname ,
11+ getDocHref ,
1112} from '../../../db/utils'
1213import { join } from 'path'
1314import BasicInputFormLocal from '../../../../components/v2/organisms/BasicInputFormLocal'
@@ -267,13 +268,18 @@ export function useLocalUI() {
267268 return
268269 }
269270
270- await createNote ( body . workspaceId , {
271+ const note = await createNote ( body . workspaceId , {
271272 title : inputValue ,
272273 folderPathname :
273274 body . parentFolderPathname != null
274275 ? body . parentFolderPathname
275276 : '/' ,
276277 } )
278+
279+ if ( note != null ) {
280+ push ( getDocHref ( note , body . workspaceId ) )
281+ }
282+
277283 closeModalAndUpdateState ( )
278284 } }
279285 /> ,
@@ -283,7 +289,7 @@ export function useLocalUI() {
283289 }
284290 )
285291 } ,
286- [ openModal , createNote , closeModalAndUpdateState ]
292+ [ openModal , createNote , push , closeModalAndUpdateState ]
287293 )
288294
289295 const removeWorkspace = useCallback (
You can’t perform that action at this time.
0 commit comments