"Cancel" buttons replaced with <Link>

This commit is contained in:
2024-02-06 14:29:58 +01:00
parent 93dd9bf3f4
commit 8aaf2a0dea
4 changed files with 19 additions and 26 deletions

View File

@@ -6,6 +6,7 @@ import { deleteLocationById } from "../lib/actions/locationActions";
import { useFormState } from "react-dom";
import { Main } from "./Main";
import { gotoUrl } from "../lib/actions/navigationActions";
import Link from "next/link";
export interface LocationDeleteFormProps {
/** location which should be deleted */
@@ -31,7 +32,7 @@ export const LocationDeleteForm:FC<LocationDeleteFormProps> = ({ location }) =>
</p>
<div className="pt-4 text-center">
<button className="btn btn-primary">Confim</button>
<button type="button" className="btn btn-neutral ml-3" onClick={handleCancel}>Cancel</button>
<Link className="btn btn-neutral ml-3" href={`/location/${location._id}/edit/`}>Cancel</Link>
</div>
</form>
</div>