doc: add useHistory on react-router-dom

This commit is contained in:
Leon Xu committed 2022-05-07 13:33:52 -07:00
1 parent 340ef629a8
commit 1d4b8f215c
1 file changed
+2
+2
View File
@@ -1,10 +1,12 @@
import React from "react";
import { useHistory } from "react-router-dom";
import CurrencyFormat from "react-currency-format";
import { useStateValue } from "../redux/StateProvider";
import { getBasketTotal } from "../redux/reducer";
import "./Subtotal.css";
function Subtotal() {
const history = useHistory();
const [{ basket }, dispatch] = useStateValue();
return (
<section className="subtotal">