Skip to content

Commit

Permalink
Fix unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavlrsn committed Jan 22, 2025
1 parent ce8cd2a commit c2ac1c1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions components/submit-expense/SubmitExpenseFlowSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import type { Path } from 'dot-path-value';
import { useFormikContext } from 'formik';
import { get, isEmpty } from 'lodash';
import type { IntlShape, MessageDescriptor } from 'react-intl';
import type { MessageDescriptor } from 'react-intl';
import { defineMessage, FormattedMessage } from 'react-intl';

import { cn } from '../../lib/utils';
Expand Down Expand Up @@ -103,14 +103,6 @@ function isExpenseFormStepCompleted(form: ExpenseForm, step: Step): boolean {
return valueKeys.map(valueKey => isEmpty(get(form.errors, valueKey))).every(Boolean);
}

export function expenseFormStepError(intl: IntlShape, form: ExpenseForm, step: Step): string {
if (expenseFormStepHasError(form, step) && isExpenseFormStepTouched(form, step) && form.submitCount > 0) {
return intl.formatMessage({ defaultMessage: 'Required', id: 'Seanpx' });
}

return null;
}

function expenseFormStepHasError(form: ExpenseForm, step: Step): boolean {
return !isExpenseFormStepCompleted(form, step);
}
Expand Down

0 comments on commit c2ac1c1

Please sign in to comment.