Skip to content

Commit

Permalink
fix typecheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Jan 7, 2025
1 parent 121688f commit 07cbb1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/pages/iou/request/step/IOURequestStepDestination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import WorkspaceEmptyStateSection from '@components/WorkspaceEmptyStateSection';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import usePermissions from '@hooks/usePermissions';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
Expand Down Expand Up @@ -55,7 +54,6 @@ function IOURequestStepDestination({
const styles = useThemeStyles();
const theme = useTheme();
const {translate} = useLocalize();
const {canUseCombinedTrackSubmit} = usePermissions();

// eslint-disable-next-line rulesdir/no-negated-variables
const shouldShowNotFoundPage = isEmptyObject(policy);
Expand Down Expand Up @@ -93,11 +91,11 @@ function IOURequestStepDestination({

const tabTitles = {
[CONST.IOU.TYPE.REQUEST]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SUBMIT]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.submitExpense'),
[CONST.IOU.TYPE.SUBMIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SEND]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.PAY]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.SPLIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),
[CONST.IOU.TYPE.TRACK]: translate('iou.createExpense'),
[CONST.IOU.TYPE.INVOICE]: translate('workspace.invoices.sendInvoice'),
[CONST.IOU.TYPE.CREATE]: translate('iou.createExpense'),
};
Expand Down
6 changes: 2 additions & 4 deletions src/pages/iou/request/step/IOURequestStepSubrate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import TextInput from '@components/TextInput';
import ValuePicker from '@components/ValuePicker';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import usePermissions from '@hooks/usePermissions';
import usePolicy from '@hooks/usePolicy';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
Expand Down Expand Up @@ -68,7 +67,6 @@ function IOURequestStepWaypoint({
report,
}: IOURequestStepWaypointProps) {
const styles = useThemeStyles();
const {canUseCombinedTrackSubmit} = usePermissions();
const policy = usePolicy(report?.policyID);
const customUnit = PolicyUtils.getPerDiemCustomUnit(policy);
const {windowWidth} = useWindowDimensions();
Expand Down Expand Up @@ -150,11 +148,11 @@ function IOURequestStepWaypoint({

const tabTitles = {
[CONST.IOU.TYPE.REQUEST]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SUBMIT]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.submitExpense'),
[CONST.IOU.TYPE.SUBMIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SEND]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.PAY]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.SPLIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),
[CONST.IOU.TYPE.TRACK]: translate('iou.createExpense'),
[CONST.IOU.TYPE.INVOICE]: translate('workspace.invoices.sendInvoice'),
[CONST.IOU.TYPE.CREATE]: translate('iou.createExpense'),
};
Expand Down
6 changes: 2 additions & 4 deletions src/pages/iou/request/step/IOURequestStepTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import InputWrapper from '@components/Form/InputWrapper';
import type {FormOnyxValues} from '@components/Form/types';
import TimeModalPicker from '@components/TimeModalPicker';
import useLocalize from '@hooks/useLocalize';
import usePermissions from '@hooks/usePermissions';
import useThemeStyles from '@hooks/useThemeStyles';
import DateUtils from '@libs/DateUtils';
import * as ErrorUtils from '@libs/ErrorUtils';
Expand Down Expand Up @@ -45,7 +44,6 @@ function IOURequestStepTime({
const styles = useThemeStyles();
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${IOU.getIOURequestPolicyID(transaction, report)}`);
const {translate} = useLocalize();
const {canUseCombinedTrackSubmit} = usePermissions();
const currentDateAttributes = transaction?.comment?.customUnit?.attributes?.dates;
const currentStartDate = currentDateAttributes?.start ? DateUtils.extractDate(currentDateAttributes.start) : undefined;
const currentEndDate = currentDateAttributes?.end ? DateUtils.extractDate(currentDateAttributes.end) : undefined;
Expand Down Expand Up @@ -89,11 +87,11 @@ function IOURequestStepTime({

const tabTitles = {
[CONST.IOU.TYPE.REQUEST]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SUBMIT]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.submitExpense'),
[CONST.IOU.TYPE.SUBMIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.SEND]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.PAY]: translate('iou.paySomeone', {name: ''}),
[CONST.IOU.TYPE.SPLIT]: translate('iou.createExpense'),
[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),
[CONST.IOU.TYPE.TRACK]: translate('iou.createExpense'),
[CONST.IOU.TYPE.INVOICE]: translate('workspace.invoices.sendInvoice'),
[CONST.IOU.TYPE.CREATE]: translate('iou.createExpense'),
};
Expand Down

0 comments on commit 07cbb1e

Please sign in to comment.