feat: update environment configuration and enhance API integration

- Remove versioning from docker-compose.yml
- Enhance Vite configuration to support API proxying for development
- Improve error handling and data normalization in API service
- Add fallback values in PublicationsTable and ResearcherCard components
- Update sync functionality in DashboardPage to handle backend responses more effectively
- Refactor mockSyncResearcher to simulate backend response structure
This commit is contained in:
Alexis
2026-04-24 10:40:28 +02:00
parent 89c45b7d67
commit 2bb1309133
9 changed files with 182 additions and 72 deletions
+22 -3
View File
@@ -1,8 +1,27 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const proxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:8000'
return {
plugins: [react(), tailwindcss()],
server: {
host: true,
port: 5173,
proxy: {
'/researchers': {
target: proxyTarget,
changeOrigin: true,
},
'/health': {
target: proxyTarget,
changeOrigin: true,
},
},
},
}
})