Skip to content

Commit

Permalink
docs: Fix example in "Navigating Programmatically" (#8689)
Browse files Browse the repository at this point in the history
  • Loading branch information
shihanng committed Feb 27, 2022
1 parent 8601f27 commit a2fc007
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -38,3 +38,4 @@
- turansky
- underager
- vijaypushkin
- shihanng
4 changes: 2 additions & 2 deletions docs/getting-started/tutorial.md
Expand Up @@ -806,8 +806,8 @@ export function deleteInvoice(number) {
Now let's add the delete button, call our new function, and navigate to the index route:

```js lines=[1-2,5,17-24] filename=src/routes/invoice.jsx
import { useParams, useNavigate } from "react-router-dom";
```js lines=[1-2,5-6,17-26] filename=src/routes/invoice.jsx
import { useParams, useNavigate, useLocation } from "react-router-dom";
import { getInvoice, deleteInvoice } from "../data";
export default function Invoice() {
Expand Down

0 comments on commit a2fc007

Please sign in to comment.