import React, { useState, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { fetchLinkedInAccounts, deleteLinkedInAccount, setPrimaryLinkedInAccount, clearLinkedInError } from '../store/reducers/linkedinAccountsSlice'; import LinkedInAccountsManager from '../components/LinkedInAccount/LinkedInAccountsManager'; import { testApiStructure, testServiceBehavior } from '../debug/testApi'; const Accounts = () => { const dispatch = useDispatch(); const { linkedinAccounts, loading, error } = useSelector(state => { console.log('๐ [DEBUG] Accounts component - Redux state:', state); console.log('๐ [DEBUG] Accounts component - linkedinAccounts state:', state.linkedinAccounts); return state.linkedinAccounts; }); useEffect(() => { console.log('๐ [DEBUG] Accounts component - useEffect triggered'); console.log('๐ [DEBUG] Accounts component - Current state:', { linkedinAccounts, loading, error }); dispatch(fetchLinkedInAccounts()); dispatch(clearLinkedInError()); // Run API tests console.log('๐งช [TEST] Running API tests...'); testApiStructure(); testServiceBehavior(); }, [dispatch]); return (
Manage your social media accounts and connections for seamless content distribution
Total Accounts
0
Active
0
Primary
0
Connected
0%
{error}