Progress
This commit is contained in:
@@ -3,13 +3,13 @@ import { Button, notification, Popconfirm } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { DELETE_TEMPLATE } from "../../graphql/templates.queries";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
export default function ShopTemplateDeleteComponent({ templateId, refetch }) {
|
||||
const { t } = useTranslation();
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const search = queryString.parse(useSearchParams().toString());
|
||||
const history = useNavigate();
|
||||
const [deleteTemplate] = useMutation(DELETE_TEMPLATE);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function ShopTemplateDeleteComponent({ templateId, refetch }) {
|
||||
});
|
||||
} else {
|
||||
delete search.customTemplateId;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
history({ search: queryString.stringify(search) });
|
||||
if (!!refetch) refetch();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user