Skip to content

Commit 73ec68a

Browse files
committed
Merge branch 'main' into revert-35347-marco-displayPayButtonReimburser
2 parents b0043b5 + 1bf483d commit 73ec68a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pages/ShareCodePage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
1212
import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
1313
import ScreenWrapper from '@components/ScreenWrapper';
1414
import Section from '@components/Section';
15-
import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails';
16-
import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails';
15+
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
1716
import useEnvironment from '@hooks/useEnvironment';
1817
import useLocalize from '@hooks/useLocalize';
1918
import useThemeStyles from '@hooks/useThemeStyles';
@@ -28,22 +27,23 @@ import CONST from '@src/CONST';
2827
import ROUTES from '@src/ROUTES';
2928
import type {Report, Session} from '@src/types/onyx';
3029

31-
type ShareCodePageOnyxProps = WithCurrentUserPersonalDetailsProps & {
30+
type ShareCodePageOnyxProps = {
3231
/** Session info for the currently logged in user. */
33-
session: OnyxEntry<Session>;
32+
session?: OnyxEntry<Session>;
3433

3534
/** The report currently being looked at */
3635
report?: OnyxEntry<Report>;
3736
};
3837

3938
type ShareCodePageProps = ShareCodePageOnyxProps;
4039

41-
function ShareCodePage({report, session, currentUserPersonalDetails}: ShareCodePageProps) {
40+
function ShareCodePage({report, session}: ShareCodePageProps) {
4241
const themeStyles = useThemeStyles();
4342
const {translate} = useLocalize();
4443
const {environmentURL} = useEnvironment();
4544
const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
4645
const {isSmallScreenWidth} = useWindowDimensions();
46+
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
4747

4848
const isReport = !!report?.reportID;
4949

@@ -145,4 +145,4 @@ function ShareCodePage({report, session, currentUserPersonalDetails}: ShareCodeP
145145

146146
ShareCodePage.displayName = 'ShareCodePage';
147147

148-
export default withCurrentUserPersonalDetails(ShareCodePage);
148+
export default ShareCodePage;

0 commit comments

Comments
 (0)