mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:35:24 +02:00
feat: Automate Buy Box tracker sync from Dropbox and improve parsing robustness
This commit is contained in:
@@ -222,8 +222,8 @@ const App: React.FC = () => {
|
||||
|
||||
const handleBuyBoxFetch = useCallback(async () => {
|
||||
try {
|
||||
console.log('[App] Fetching Buy Box data from /Buy_Box_tracker.xlsx...');
|
||||
const response = await fetch('/Buy_Box_tracker.xlsx');
|
||||
console.log('[App] Fetching Buy Box data from /api/fetch-buybox...');
|
||||
const response = await fetch('/api/fetch-buybox');
|
||||
if (!response.ok) throw new Error(`Failed to fetch Buy Box data: ${response.status}`);
|
||||
|
||||
const buffer = await response.arrayBuffer();
|
||||
@@ -678,7 +678,7 @@ const App: React.FC = () => {
|
||||
<div className="flex items-center gap-6">
|
||||
{/* Force Sync Action */}
|
||||
<button
|
||||
onClick={() => { handleDataFetch(); handleAdsFetch(); handleTrafficFetch(); handleVendorStockFetch(); }}
|
||||
onClick={() => { handleDataFetch(); handleAdsFetch(); handleTrafficFetch(); handleVendorStockFetch(); handleBuyBoxFetch(); }}
|
||||
disabled={syncing}
|
||||
className={`flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-black uppercase tracking-widest transition-all
|
||||
${syncing
|
||||
|
||||
Reference in New Issue
Block a user