import { useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { setPageTitle } from '../../store/themeConfigSlice';
import { useTranslation } from 'react-i18next';
import { ProductsList } from '../../features/products/components/ProductsList';
import { Breadcrumb } from '../../components/Breadcrumb';

const MyProducts = () => {
    const dispatch = useDispatch();
    useEffect(() => {
        dispatch(setPageTitle(t('my_products')));
    });

    const { t } = useTranslation();

    const breadcrumbItems = [{ label: 'Dashboard', href: '/' }, { label: 'My Products' }];

    return (
        <>
            <Breadcrumb items={breadcrumbItems} />
            <h5 className="mt-5 mb-5 font-bold text-2xl">{t('my_products')}</h5>
            <ProductsList />
        </>
    );
};

export default MyProducts;
