Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: remove navigation hash on dialog close

Abdullah Atta3746ebd0be11
diff --git a/apps/web/src/navigation/hash-routes.js b/apps/web/src/navigation/hash-routes.js
index a8453f028..06490616c 100644
--- a/apps/web/src/navigation/hash-routes.js
+++ b/apps/web/src/navigation/hash-routes.js
@@ -52,31 +52,31 @@ const hashroutes = {
return !editorStore.get().session.state && <EditorPlaceholder />;
},
"/email/verify": () => {
- showEmailVerificationDialog();
+ showEmailVerificationDialog().then(afterAction);
},
"/notebooks/create": () => {
- showAddNotebookDialog();
+ showAddNotebookDialog().then(afterAction);
},
"/notebooks/:notebookId/edit": ({ notebookId }) => {
- showEditNotebookDialog(notebookId);
+ showEditNotebookDialog(notebookId).then(afterAction);
},
"/topics/create": () => {
- showCreateTopicDialog();
+ showCreateTopicDialog().then(afterAction);
},
"/reminders/create": () => {
- showAddReminderDialog();
+ showAddReminderDialog().then(afterAction);
},
"/reminders/:reminderId/edit": ({ reminderId }) => {
- showEditReminderDialog(reminderId);
+ showEditReminderDialog(reminderId).then(afterAction);
},
"/notebooks/:notebookId/topics/:topicId/edit": ({ notebookId, topicId }) => {
- showEditTopicDialog(notebookId, topicId);
+ showEditTopicDialog(notebookId, topicId).then(afterAction);
},
"/tags/create": () => {
- showCreateTagDialog();
+ showCreateTagDialog().then(afterAction);
},
"/tags/:tagId/edit": ({ tagId }) => {
- showEditTagDialog(tagId);
+ showEditTagDialog(tagId).then(afterAction);
},
"/notes/create": () => {
closeOpenedDialog();
@@ -124,20 +124,24 @@ const hashroutes = {
});
},
"/buy": () => {
- showBuyDialog();
+ showBuyDialog().then(afterAction);
},
"/buy/:code": ({ code }) => {
- showBuyDialog("monthly", code);
+ showBuyDialog("monthly", code).then(afterAction);
},
"/buy/:plan/:code": ({ plan, code }) => {
- showBuyDialog(plan, code);
+ showBuyDialog(plan, code).then(afterAction);
},
"/welcome": () => {
- showOnboardingDialog("new");
+ showOnboardingDialog("new").then(afterAction);
},
"/confirmed": () => {
- showFeatureDialog("confirmed");
+ showFeatureDialog("confirmed").then(afterAction);
}
};
export default hashroutes;
+
+function afterAction() {
+ window.location.hash = "";
+}