Skip to content

Commit

Permalink
fix filter url
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAdoniev committed Nov 13, 2023
1 parent cb71d8d commit 0a38efa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import ReactTooltip from "react-tooltip";

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

import { url } from "../constants";

export const EventDetails = () => {
let params = useParams();
const [event, setEvent] = useState<IEvent>();
Expand All @@ -21,9 +23,7 @@ export const EventDetails = () => {
useEffect(() => {
new ClipboardJS(".copy-btn");

fetch(
`https://dev-explorer-api.herokuapp.com/?fromHash=${params.fromHash}`
) //https://dev-explorer-api.herokuapp.com
fetch(`${url}?fromHash=${params.fromHash}`) //https://dev-explorer-api.herokuapp.com
.then((res) => res.json())
.then((data) => {
setEvent(data[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import axios from "axios";
import { setFrom, setTo, setEventsQueryString } from "../store/global";
import { useDispatch } from "react-redux";
import { Footer } from "../components/Footer";
import { url as uri } from "../constants";

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

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

0 comments on commit 0a38efa

Please sign in to comment.