File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import ReactTooltip from "react-tooltip";
12
12
13
13
import { FromLink } from "./elements/ExplorerLink" ;
14
14
15
+ import { url } from "../constants" ;
16
+
15
17
export const EventDetails = ( ) => {
16
18
let params = useParams ( ) ;
17
19
const [ event , setEvent ] = useState < IEvent > ( ) ;
@@ -21,9 +23,7 @@ export const EventDetails = () => {
21
23
useEffect ( ( ) => {
22
24
new ClipboardJS ( ".copy-btn" ) ;
23
25
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
27
27
. then ( ( res ) => res . json ( ) )
28
28
. then ( ( data ) => {
29
29
setEvent ( data [ 0 ] ) ;
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ import axios from "axios";
30
30
import { setFrom , setTo , setEventsQueryString } from "../store/global" ;
31
31
import { useDispatch } from "react-redux" ;
32
32
import { Footer } from "../components/Footer" ;
33
+ import { url as uri } from "../constants" ;
33
34
34
35
import { getExchangeRates } from "../getExchangeRate" ;
35
36
36
37
export const Search = ( props : any ) => {
37
- const uri = `https://dev-explorer-api.herokuapp.com/` ;
38
38
const navigate = useNavigate ( ) ;
39
39
const loc = useLocation ( ) ;
40
40
const [ totalTrx , setTotalTrx ] = useState < any > ( 0 ) ;
You can’t perform that action at this time.
0 commit comments