diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index 9e7100a..2e15d4e 100644 --- a/frontend/src/api/api.js +++ b/frontend/src/api/api.js @@ -1,6 +1,6 @@ import axios from 'axios' -const API_BASE_URL = 'http://localhost:8000' +const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000' const api = axios.create({ baseURL: API_BASE_URL, diff --git a/frontend/src/components/GoogleImport.jsx b/frontend/src/components/GoogleImport.jsx index 3a1e37b..c362f10 100644 --- a/frontend/src/components/GoogleImport.jsx +++ b/frontend/src/components/GoogleImport.jsx @@ -28,7 +28,8 @@ function GoogleImport({ onImportComplete }) { const handleGoogleImport = () => { setImporting(true) // Redirect to backend OAuth endpoint (owner will be extracted from email) - window.location.href = 'http://localhost:8000/auth/google' + const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:8000' + window.location.href = `${apiUrl}/auth/google` } return (