Skip to content

Commit

Permalink
refactor: simplify switch blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mananjadhav committed Nov 8, 2024
1 parent 72a9927 commit 37f3263
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,11 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu}: Fl

switch (quickAction?.action) {
case CONST.QUICK_ACTIONS.REQUEST_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.REQUEST_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.REQUEST_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), true);
return;
Expand All @@ -271,11 +265,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu}: Fl
selectOption(() => Task.startOutCreateTaskQuickAction(isValidReport ? quickActionReportID : '', quickAction.targetAccountID ?? -1), false);
break;
case CONST.QUICK_ACTIONS.TRACK_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, undefined, true), false);
break;
case CONST.QUICK_ACTIONS.TRACK_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, undefined, true), false);
break;
case CONST.QUICK_ACTIONS.TRACK_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, undefined, true), false);
break;
Expand Down

0 comments on commit 37f3263

Please sign in to comment.