Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodebrute committed May 6, 2024
1 parent 165e181 commit cd23f73
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageP
const currency = rate?.currency ?? CONST.CURRENCY.USD;
const currentRateValue = (rate?.rate ?? 0).toString();

if (!rate) {
return <NotFoundPage />;
}

const submitRate = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.POLICY_DISTANCE_RATE_EDIT_FORM>) => {
Policy.updatePolicyDistanceRateValue(policyID, customUnit, [{...rate, rate: Number(values.rate) * CONST.POLICY.CUSTOM_UNIT_RATE_BASE_OFFSET}]);
Keyboard.dismiss();
Expand All @@ -59,6 +55,10 @@ function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageP
[currency, toLocaleDigit],
);

if (!rate) {
return <NotFoundPage />;
}

return (
<AccessOrNotFoundWrapper
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]}
Expand Down

0 comments on commit cd23f73

Please sign in to comment.