sda
This commit is contained in:
@@ -13,9 +13,10 @@ import {
|
||||
Wrench,
|
||||
Database
|
||||
} from 'lucide-react';
|
||||
import { toast } from 'react-hot-toast';
|
||||
import SiteAndSectorSelector from '../../components/common/SiteAndSectorSelector';
|
||||
import { useSiteStore } from '../../store/siteStore';
|
||||
import { useToast } from '../../components/ui/toast/ToastContainer';
|
||||
import { API_BASE_URL } from '../../services/api';
|
||||
|
||||
// Types for WordPress integration debugging
|
||||
interface IntegrationHealth {
|
||||
@@ -46,21 +47,18 @@ interface DataValidation {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
const API_BASE_URL = process.env.NODE_ENV === 'production'
|
||||
? 'https://app.igny8.com/api'
|
||||
: 'http://localhost:8000/api';
|
||||
|
||||
export default function WordPressIntegrationDebug() {
|
||||
// State
|
||||
const [debugEnabled, setDebugEnabled] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [pollingInterval, setPollingInterval] = useState<NodeJS.Timeout | null>(null);
|
||||
const [pollingInterval, setPollingInterval] = useState<any>(null);
|
||||
const [integrationHealth, setIntegrationHealth] = useState<IntegrationHealth | null>(null);
|
||||
const [syncEvents, setSyncEvents] = useState<SyncEvent[]>([]);
|
||||
const [dataValidation, setDataValidation] = useState<DataValidation[]>([]);
|
||||
|
||||
// Get active site from store
|
||||
const { activeSite } = useSiteStore();
|
||||
const toast = useToast();
|
||||
|
||||
// Helper to get auth token
|
||||
const getAuthToken = () => {
|
||||
|
||||
Reference in New Issue
Block a user