import { Button } from '../../ui-kit/Button/Button'; import { MAX_CATEGORIES } from './constants'; type RenderButtonsProps = { cashbacksLength: number; onAddNewCashback: () => void; onResetCashback: () => void; calculatorType?: string; maxCategories?: number; }; export const renderButtons = ({ cashbacksLength, onAddNewCashback, onResetCashback, calculatorType = 'standard', maxCategories = MAX_CATEGORIES[calculatorType], }: RenderButtonsProps) => { return (
{cashbacksLength < maxCategories ? ( ) : null} {cashbacksLength > 2 ? ( ) : null}
); };