Skip to content

Commit b171f98

Browse files
committed
refactor: Use policy.chatReportIDAdmins to get updated adminsRoomReportID for each policy
1 parent 93e8693 commit b171f98

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pages/workspace/accounting/PolicyAccountingPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
504504

505505
const [chatTextLink, chatReportID] = useMemo(() => {
506506
// If they have an onboarding specialist assigned display the following and link to the #admins room with the setup specialist.
507-
if (account?.adminsRoomReportID) {
508-
return [translate('workspace.accounting.talkYourOnboardingSpecialist'), account?.adminsRoomReportID];
507+
if (policy?.chatReportIDAdmins) {
508+
return [translate('workspace.accounting.talkYourOnboardingSpecialist'), policy?.chatReportIDAdmins];
509509
}
510510

511511
// If not, if they have an account manager assigned display the following and link to the DM with their account manager.
@@ -618,7 +618,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
618618
/>
619619
<View style={[!isLargeScreenWidth ? styles.flexColumn : styles.flexRow]}>
620620
<Text style={styles.textSupporting}>{translate('workspace.accounting.needAnotherAccounting')}</Text>
621-
<TextLink onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chatReportID))}>{chatTextLink}</TextLink>
621+
<TextLink onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(String(chatReportID)))}>{chatTextLink}</TextLink>
622622
</View>
623623
</View>
624624
)}

0 commit comments

Comments
 (0)