mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
web: add support for /notes/:noteId/edit hash route
This commit is contained in:
@@ -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 <Editor nonce={nonce} />;
|
||||
// },
|
||||
// "/notes/:noteId/edit": ({ noteId }) => {
|
||||
// closeOpenedDialog();
|
||||
// editorStore.get().openSession(noteId);
|
||||
// // return <Editor noteId={noteId} />;
|
||||
// },
|
||||
// "/notes/:noteId/unlock": ({ noteId }) => {
|
||||
// closeOpenedDialog();
|
||||
// editorStore.get().openSession(noteId);
|
||||
// // return (
|
||||
// // <RouteContainer
|
||||
// // type="unlock"
|
||||
// // buttons={{
|
||||
// // back: isMobile()
|
||||
// // ? {
|
||||
// // title: "Go back",
|
||||
// // onClick: () =>
|
||||
// // hashNavigate("/notes/create", {
|
||||
// // addNonce: true,
|
||||
// // replace: true
|
||||
// // })
|
||||
// // }
|
||||
// // : undefined
|
||||
// // }}
|
||||
// // >
|
||||
// // <Unlock noteId={noteId} />
|
||||
// // </RouteContainer>
|
||||
// // );
|
||||
// },
|
||||
// "/notes/:noteId/conflict": ({ noteId }) => {
|
||||
// closeOpenedDialog();
|
||||
// return <DiffViewer noteId={noteId} />;
|
||||
// },
|
||||
"/notes/:noteId/edit": ({ noteId }) => {
|
||||
useEditorStore.getState().openSession(noteId);
|
||||
},
|
||||
"/buy": () => {
|
||||
showBuyDialog().then(afterAction);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user