fix: Do not copy edit path from headers

chore: Rename url -> path in routeHelpers
closes #5229
This commit is contained in:
Tom Moor
2023-04-22 10:00:09 -04:00
parent 4b5680a16e
commit e2c5fda610
19 changed files with 91 additions and 80 deletions

View File

@@ -9,7 +9,7 @@ import Flex from "~/components/Flex";
import PlaceholderDocument from "~/components/PlaceholderDocument";
import useStores from "~/hooks/useStores";
import useToasts from "~/hooks/useToasts";
import { editDocumentUrl } from "~/utils/routeHelpers";
import { documentEditPath } from "~/utils/routeHelpers";
function DocumentNew() {
const history = useHistory();
@@ -37,7 +37,7 @@ function DocumentNew() {
title: "",
text: "",
});
history.replace(editDocumentUrl(document), location.state);
history.replace(documentEditPath(document), location.state);
} catch (err) {
showToast(t("Couldnt create the document, try again?"), {
type: "error",