doc: add useHistory on react-router-dom
This commit is contained in:
1 parent
340ef629a8
commit
1d4b8f215c
1 file changed
+2
@@ -1,10 +1,12 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
import CurrencyFormat from "react-currency-format";
|
import CurrencyFormat from "react-currency-format";
|
||||||
import { useStateValue } from "../redux/StateProvider";
|
import { useStateValue } from "../redux/StateProvider";
|
||||||
import { getBasketTotal } from "../redux/reducer";
|
import { getBasketTotal } from "../redux/reducer";
|
||||||
import "./Subtotal.css";
|
import "./Subtotal.css";
|
||||||
|
|
||||||
function Subtotal() {
|
function Subtotal() {
|
||||||
|
const history = useHistory();
|
||||||
const [{ basket }, dispatch] = useStateValue();
|
const [{ basket }, dispatch] = useStateValue();
|
||||||
return (
|
return (
|
||||||
<section className="subtotal">
|
<section className="subtotal">
|
||||||
|
|||||||
Reference in new issue
Block a user