import { Button } from '@mui/material';
import CircularProgress from '@mui/material/CircularProgress';
import { useTranslation } from 'next-i18next';
import Image from 'next/image';
const LoadMore = ({ fetchNextPage, isFetchingNextPage, hasNextPage }) => {
const { t } = useTranslation('products');
return (
)
}
sx={{
backgroundColor: 'primary.main',
height: 50,
width: 150,
color: 'white',
':hover': {
bgcolor: 'primary.main',
color: 'white',
},
}}
>
{isFetchingNextPage && (
)}
{isFetchingNextPage
? t('products:loading')
: hasNextPage
? t('products:more')
: t('products:end')}
);
};
export default LoadMore;