Skip to content

Commit 0a38efa

Browse files
committed
fix filter url
1 parent cb71d8d commit 0a38efa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/EventDetails.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import ReactTooltip from "react-tooltip";
1212

1313
import { FromLink } from "./elements/ExplorerLink";
1414

15+
import { url } from "../constants";
16+
1517
export const EventDetails = () => {
1618
let params = useParams();
1719
const [event, setEvent] = useState<IEvent>();
@@ -21,9 +23,7 @@ export const EventDetails = () => {
2123
useEffect(() => {
2224
new ClipboardJS(".copy-btn");
2325

24-
fetch(
25-
`https://dev-explorer-api.herokuapp.com/?fromHash=${params.fromHash}`
26-
) //https://dev-explorer-api.herokuapp.com
26+
fetch(`${url}?fromHash=${params.fromHash}`) //https://dev-explorer-api.herokuapp.com
2727
.then((res) => res.json())
2828
.then((data) => {
2929
setEvent(data[0]);

src/pages/Search.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import axios from "axios";
3030
import { setFrom, setTo, setEventsQueryString } from "../store/global";
3131
import { useDispatch } from "react-redux";
3232
import { Footer } from "../components/Footer";
33+
import { url as uri } from "../constants";
3334

3435
import { getExchangeRates } from "../getExchangeRate";
3536

3637
export const Search = (props: any) => {
37-
const uri = `https://dev-explorer-api.herokuapp.com/`;
3838
const navigate = useNavigate();
3939
const loc = useLocation();
4040
const [totalTrx, setTotalTrx] = useState<any>(0);

0 commit comments

Comments
 (0)