diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 156b896b8baa..12c2d6a85d47 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -3,12 +3,12 @@ import {View} from 'react-native'; import type {ValueOf} from 'type-fest'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; -import SelectionList from '@components/SelectionListWithSections'; -import RadioListItem from '@components/SelectionListWithSections/RadioListItem'; -import type {ListItem} from '@components/SelectionListWithSections/types'; +import SelectionList from '@components/SelectionList'; +import RadioListItem from '@components/SelectionList/ListItem/RadioListItem'; +import type {ListItem} from '@components/SelectionList/ListItem/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as Report from '@libs/actions/Report'; +import {updateGroupChatMemberRoles} from '@libs/actions/Report'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; @@ -30,7 +30,7 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo const styles = useThemeStyles(); const accountID = Number(route?.params?.accountID) ?? -1; - const backTo = ROUTES.REPORT_PARTICIPANTS_DETAILS.getRoute(report?.reportID ?? '-1', accountID, route.params.backTo); + const backTo = ROUTES.REPORT_PARTICIPANTS_DETAILS.getRoute(report.reportID, accountID, route.params.backTo); const member = report.participants?.[accountID]; if (!member) { @@ -53,7 +53,7 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo ]; const changeRole = ({value}: ListItemType) => { - Report.updateGroupChatMemberRoles(report.reportID, [accountID], value); + updateGroupChatMemberRoles(report.reportID, [accountID], value); Navigation.goBack(backTo); }; @@ -65,11 +65,11 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo /> item.isSelected)?.keyForList} + initiallyFocusedItemKey={items.find((item) => item.isSelected)?.keyForList} />