refactoring: changing param list of a fn
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user