Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/EditorPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {getNotebookById, createNotebook, addNotebook, saveNotebook, getNotebooks
import {isDirtyStore, countStore} from "./store.js";
import {cn} from "./cn.js";
import {SafeLink} from "./SafeLink.jsx";
import {BASE_PATH} from "./shared.js";

const UNSET = Symbol("UNSET");

Expand Down Expand Up @@ -39,7 +40,7 @@ export function EditorPage({id: initialId}) {
prevCount.current = count;
const id = notebook.id;
setId(id); // Force re-render.
window.history.pushState(null, "", `/works/${id}`); // Just update the url, no need to reload the page.
window.history.pushState(null, "", `${BASE_PATH}/works/${id}`); // Just update the url, no need to reload the page.
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [notebook]);
Expand Down