From e492068ddec1cffa2f32bb149d0ce7cb7b9f7765 Mon Sep 17 00:00:00 2001 From: Choco Date: Wed, 2 Aug 2023 12:01:41 +1000 Subject: [PATCH 1/2] Set the base url by env file --- frontend/package.json | 10 +++++----- frontend/src/constants/urls.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index fbe27b5..73b5309 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,6 +10,9 @@ "preview": "vite preview" }, "dependencies": { + "@types/react": "^18.0.37", + "@types/react-dom": "^18.0.11", + "@vitejs/plugin-react": "^4.0.0", "autoprefixer": "^10.4.14", "axios": "^1.4.0", "lodash.debounce": "^4.0.8", @@ -20,12 +23,9 @@ "sass": "^1.63.6", "tailwind-merge": "^1.13.2", "tailwindcss": "^3.3.2", - "vite-tsconfig-paths": "^4.2.0", - "web3": "1.6.1", "vite": "^4.4.7", - "@types/react": "^18.0.37", - "@types/react-dom": "^18.0.11", - "@vitejs/plugin-react": "^4.0.0" + "vite-tsconfig-paths": "^4.2.0", + "web3": "1.6.1" }, "devDependencies": { "@types/axios": "^0.14.0", diff --git a/frontend/src/constants/urls.ts b/frontend/src/constants/urls.ts index a4bb44b..de282c1 100644 --- a/frontend/src/constants/urls.ts +++ b/frontend/src/constants/urls.ts @@ -1 +1 @@ -export const baseUrl = 'https://devnetstats.apothem.network/stats'; \ No newline at end of file +export const baseUrl = `${import.meta.env.VITE_SUBNET_URL}/stats`; \ No newline at end of file From 371eb935dfad9b3fb663ce2d6d9de0821dbc4be5 Mon Sep 17 00:00:00 2001 From: Choco Date: Thu, 3 Aug 2023 17:15:53 +1000 Subject: [PATCH 2/2] Update package.json --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 73b5309..31220bb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ "dependencies": { "@types/react": "^18.0.37", "@types/react-dom": "^18.0.11", + "@types/lodash.debounce": "^4.0.7", "@vitejs/plugin-react": "^4.0.0", "autoprefixer": "^10.4.14", "axios": "^1.4.0", @@ -29,7 +30,6 @@ }, "devDependencies": { "@types/axios": "^0.14.0", - "@types/lodash.debounce": "^4.0.7", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "eslint": "^8.38.0",