From 1f00a39e80c98cc25776a63e098724b4ea93edac Mon Sep 17 00:00:00 2001 From: Junhui Chen Date: Sun, 3 Aug 2025 15:35:04 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20API=5FENDPOINT=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 1 - app.json | 1 + app/_layout.tsx | 20 ++++++++++---------- lib/server-api-util.ts | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.env b/.env index a102646..e69de29 100644 --- a/.env +++ b/.env @@ -1 +0,0 @@ -API_ENDPOINT=https://api.memorywake.com/api \ No newline at end of file diff --git a/app.json b/app.json index e201da3..63fd639 100644 --- a/app.json +++ b/app.json @@ -84,6 +84,7 @@ "typedRoutes": true }, "extra": { + "API_ENDPOINT": "http://192.168.31.107:8081/api", "router": {}, "eas": { "projectId": "04721dd4-6b15-495a-b9ec-98187c613172" diff --git a/app/_layout.tsx b/app/_layout.tsx index 675444b..3f1d690 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -1,3 +1,4 @@ +import { PermissionProvider } from '@/context/PermissionContext'; import { useColorScheme } from '@/hooks/useColorScheme'; import { registerBackgroundUploadTask } from '@/lib/background-uploader/automatic'; import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; @@ -7,7 +8,6 @@ import { StatusBar } from 'expo-status-bar'; import { useEffect } from 'react'; import 'react-native-reanimated'; import '../global.css'; -import { PermissionProvider } from '@/context/PermissionContext'; import { Provider } from "../provider"; export default function RootLayout() { @@ -34,15 +34,15 @@ export default function RootLayout() { - - - + + + diff --git a/lib/server-api-util.ts b/lib/server-api-util.ts index 10d06fc..ba4ec7a 100644 --- a/lib/server-api-util.ts +++ b/lib/server-api-util.ts @@ -128,6 +128,7 @@ export const fetchApi = async ( needToast = true, needToken = true, ): Promise => { + // console.log("API_ENDPOINT", Constants.expoConfig?.extra?.API_ENDPOINT); const makeRequest = async (isRetry = false): Promise> => { try { let token = "";