Skip to content

Commit

Permalink
fix lint errror
Browse files Browse the repository at this point in the history
  • Loading branch information
mkzie2 committed Jan 9, 2025
1 parent 5949d1a commit 42be56a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ const ROUTES = {
},
WORKSPACE_PROFILE_DESCRIPTION: {
route: 'settings/workspaces/:policyID/profile/description',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/profile/description` as const,
getRoute: (policyID: string | undefined) => `settings/workspaces/${policyID}/profile/description` as const,
},
WORKSPACE_PROFILE_SHARE: {
route: 'settings/workspaces/:policyID/profile/share',
Expand Down
10 changes: 6 additions & 4 deletions src/pages/home/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
const {isSmallScreenWidth} = useResponsiveLayout();
const route = useRoute();
const [isDeleteTaskConfirmModalVisible, setIsDeleteTaskConfirmModalVisible] = React.useState(false);
const [invoiceReceiverPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${report?.invoiceReceiver && 'policyID' in report.invoiceReceiver ? report.invoiceReceiver.policyID : -1}`);
const [invoiceReceiverPolicy] = useOnyx(
`${ONYXKEYS.COLLECTION.POLICY}${report?.invoiceReceiver && 'policyID' in report.invoiceReceiver ? report.invoiceReceiver.policyID : CONST.DEFAULT_NUMBER_ID}`,
);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID || report?.reportID || '-1'}`);
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID || report?.reportID || CONST.DEFAULT_NUMBER_ID}`);
const policy = usePolicy(report?.policyID);
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);

Expand Down Expand Up @@ -100,7 +102,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
const reportDescription = Parser.htmlToText(ReportUtils.getReportDescription(report));
const policyName = ReportUtils.getPolicyName(report, true);
const policyDescription = ReportUtils.getPolicyDescriptionText(policy);
const isPersonalExpenseChat = isPolicyExpenseChat && ReportUtils.isCurrentUserSubmitter(report?.reportID ?? '');
const isPersonalExpenseChat = isPolicyExpenseChat && ReportUtils.isCurrentUserSubmitter(report?.reportID);
const shouldShowSubtitle = () => {
if (!subtitle) {
return false;
Expand Down Expand Up @@ -257,7 +259,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
<PressableWithoutFeedback
onPress={() => {
if (ReportUtils.canEditPolicyDescription(policy)) {
Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(report.policyID ?? '-1'));
Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(report.policyID));
return;
}
Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(reportID, Navigation.getReportRHPActiveRoute()));
Expand Down
1 change: 0 additions & 1 deletion src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import MoneyRequestHeader from '@components/MoneyRequestHeader';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView';
import ScreenWrapper from '@components/ScreenWrapper';
import TaskHeaderActionButton from '@components/TaskHeaderActionButton';
import useActiveWorkspace from '@hooks/useActiveWorkspace';
import useAppFocusEvent from '@hooks/useAppFocusEvent';
import type {CurrentReportIDContextValue} from '@hooks/useCurrentReportID';
Expand Down

0 comments on commit 42be56a

Please sign in to comment.