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 (
{/* Header Section */}

Account Management

Manage your social media accounts and connections for seamless content distribution

{/* Stats Cards */}

Total Accounts

0

Active

0

Primary

0

Connected

0%

{/* Error Display */} {error && (

{error}

)}
); }; export default Accounts;