Skip to content

Commit 6c2a31c

Browse files
MelvinBottruph01
andcommitted
Rename negated variable to fix ESLint no-negated-variables rule
Rename isNotFoundScreen to isOnGenericErrorScreen to comply with the rulesdir/no-negated-variables ESLint rule. Co-authored-by: truph01 <truph01@users.noreply.github.com>
1 parent 2daa9f0 commit 6c2a31c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/ErrorPage/NotFoundPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function NotFoundPage({onBackButtonPress = () => Navigation.goBack(), isReportRe
2525
const topmostReportId = Navigation.getTopmostReportId();
2626
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${topmostReportId}`);
2727
const route = useRoute();
28-
const isNotFoundScreen = route.name === SCREENS.NOT_FOUND;
28+
const isOnGenericErrorScreen = route.name === SCREENS.NOT_FOUND;
2929

3030
useAbsentPageSpan();
3131

@@ -51,7 +51,7 @@ function NotFoundPage({onBackButtonPress = () => Navigation.goBack(), isReportRe
5151
}}
5252
// eslint-disable-next-line react/jsx-props-no-spreading
5353
{...fullPageNotFoundViewProps}
54-
onLinkPress={isNotFoundScreen ? () => Navigation.goBack(ROUTES.HOME) : fullPageNotFoundViewProps.onLinkPress}
54+
onLinkPress={isOnGenericErrorScreen ? () => Navigation.goBack(ROUTES.HOME) : fullPageNotFoundViewProps.onLinkPress}
5555
/>
5656
</ScreenWrapper>
5757
);

0 commit comments

Comments
 (0)