Skip to content

Commit 97d1241

Browse files
committed
fix: fix env
1 parent 79223d6 commit 97d1241

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npm run lint
1212
.env
1313

1414
```sh
15-
PARALLEL_EVM_EXPLORER_SERVER=http://<your-server-host>:<port>
15+
NEXT_PUBLIC_API_SERVER=http://<your-server-host>:<port>
1616
```
1717

1818
```sh

frontend/src/utils/api.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ const fetchRequest = async (url, options = {}) => {
1212

1313
if (method === "GET" && Object.keys(params).length > 0) {
1414
const queryString = new URLSearchParams(params).toString();
15+
console.log("url1", url);
1516
url = `${url}?${queryString}`;
17+
console.log("url2", url);
1618
}
1719

1820
if (method === "POST" && Object.keys(params).length > 0) {
1921
config.body = JSON.stringify(params);
2022
}
2123

2224
try {
25+
console.log("url3", `${process.env.NEXT_PUBLIC_API_SERVER}${url}`);
2326
const response = await fetch(
24-
`${process.env.PARALLEL_EVM_EXPLORER_SERVER}${url}`,
27+
`${process.env.NEXT_PUBLIC_API_SERVER}${url}`,
2528
config,
2629
);
2730

0 commit comments

Comments
 (0)