import React from 'react';
import { useAdmin } from '../../context/AdminContext';
import CampaignsView from './CampaignsView';

export default function CampaignsPanel() {
    const { setActiveTab, setWizardId } = useAdmin();

    const handleNavigate = (view, params) => {
        if (view === 'wizard') {
            setWizardId(params?.wizardId || null);
            setActiveTab('newCampaign');
        }
    };

    return <CampaignsView onNavigate={handleNavigate} />;
}
