mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 13:15:24 +02:00
feat: show EOL not neccessary for OOC products with 0 stock
This commit is contained in:
+5
-2
@@ -24,8 +24,11 @@ export default function App() {
|
||||
|
||||
useEffect(() => {
|
||||
const loadDefaultData = async () => {
|
||||
// Use Vite's dev proxy to avoid CORS issues
|
||||
const fileUrl = '/dropbox-file/scl/fi/nkyabkq2jdwfudof2ovrl/Data-Matrix.xlsx?rlkey=1cz5fuabwipqqivihii7sybw0&st=io0g4wvb&dl=1';
|
||||
// In dev: Vite proxy handles /dropbox-file (see vite.config.ts)
|
||||
// In prod: Vercel serverless function at /api/dropbox-proxy handles it
|
||||
const fileUrl = import.meta.env.DEV
|
||||
? '/dropbox-file/scl/fi/nkyabkq2jdwfudof2ovrl/Data-Matrix.xlsx?rlkey=1cz5fuabwipqqivihii7sybw0&st=io0g4wvb&dl=1'
|
||||
: '/api/dropbox-proxy';
|
||||
|
||||
setIsLoadingDefault(true);
|
||||
setDefaultLoadError(null);
|
||||
|
||||
Reference in New Issue
Block a user