diff --git a/apps/web/src/navigation/hash-routes.tsx b/apps/web/src/navigation/hash-routes.tsx index 63cc78034..47bc3a2b8 100644 --- a/apps/web/src/navigation/hash-routes.tsx +++ b/apps/web/src/navigation/hash-routes.tsx @@ -33,6 +33,7 @@ import { } from "../common/dialog-controller"; import { hashNavigate } from "."; import { defineRoutes } from "./types"; +import { useEditorStore } from "../stores/editor-store"; const hashroutes = defineRoutes({ "/": () => { @@ -56,47 +57,9 @@ const hashroutes = defineRoutes({ "/tags/create": () => { showCreateTagDialog().then(afterAction); }, - // "/notes/create": () => { - // closeOpenedDialog(); - // editorStore.get().newSession(); - // // hashNavigate("/notes/create", { addNonce: true, replace: true }); - // }, - // "/notes/create/:nonce": ({ nonce }) => { - // closeOpenedDialog(); - // // return ; - // }, - // "/notes/:noteId/edit": ({ noteId }) => { - // closeOpenedDialog(); - // editorStore.get().openSession(noteId); - // // return ; - // }, - // "/notes/:noteId/unlock": ({ noteId }) => { - // closeOpenedDialog(); - // editorStore.get().openSession(noteId); - // // return ( - // // - // // hashNavigate("/notes/create", { - // // addNonce: true, - // // replace: true - // // }) - // // } - // // : undefined - // // }} - // // > - // // - // // - // // ); - // }, - // "/notes/:noteId/conflict": ({ noteId }) => { - // closeOpenedDialog(); - // return ; - // }, + "/notes/:noteId/edit": ({ noteId }) => { + useEditorStore.getState().openSession(noteId); + }, "/buy": () => { showBuyDialog().then(afterAction); },