refactoring: changing param list of a fn

This commit is contained in:
2024-02-01 15:07:30 +01:00
parent a1abc450bf
commit 2261e83715
8 changed files with 26 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ import { BillingLocation } from "../lib/db-types";
import { deleteLocationById } from "../lib/actions/locationActions";
import { useFormState } from "react-dom";
import { Main } from "./Main";
import { gotoHome } from "../lib/actions/navigationActions";
import { gotoUrl } from "../lib/actions/navigationActions";
export interface LocationDeleteFormProps {
/** location which should be deleted */
@@ -18,7 +18,7 @@ export const LocationDeleteForm:FC<LocationDeleteFormProps> = ({ location }) =>
const [ state, dispatch ] = useFormState(handleAction, null);
const handleCancel = () => {
gotoHome(`/location/${location._id}/edit/`);
gotoUrl(`/location/${location._id}/edit/`);
};
return(