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

@@ -6,7 +6,7 @@ import { useHistory } from "react-router-dom";
import ConfirmationDialog from "~/components/ConfirmationDialog";
import useStores from "~/hooks/useStores";
import useToasts from "~/hooks/useToasts";
import { documentUrl } from "~/utils/routeHelpers";
import { documentPath } from "~/utils/routeHelpers";
type Props = {
documentId: string;
@@ -23,7 +23,7 @@ function DocumentTemplatizeDialog({ documentId }: Props) {
const handleSubmit = React.useCallback(async () => {
const template = await document?.templatize();
if (template) {
history.push(documentUrl(template));
history.push(documentPath(template));
showToast(t("Template created, go ahead and customize it"), {
type: "info",
});