Skip to content

Commit 13c7c95

Browse files
authored
Revert "[CP Staging] fix Deeplink - App is stuck on splash screen when navigating to a public room as anon user"
1 parent 9cc90a7 commit 13c7c95

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

src/DeepLinkHandler.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) {
2828
const linkingChangeListener = useRef<NativeEventSubscription | null>(null);
2929
const initialUrlProcessed = useRef(false);
3030

31-
const [allReports, allReportsMetadata] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
31+
const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
3232
const [, sessionMetadata] = useOnyx(ONYXKEYS.SESSION);
33-
const [conciergeReportID, conciergeReportIDMetadata] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
34-
const [introSelected, introSelectedMetadata] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
33+
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
34+
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
3535
const [isSelfTourViewed, isSelfTourViewedMetadata] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
36-
const [betas, betasMetadata] = useOnyx(ONYXKEYS.BETAS);
36+
const [betas] = useOnyx(ONYXKEYS.BETAS);
3737
const isAuthenticated = useIsAuthenticated();
3838

3939
useEffect(() => {
40-
if (isLoadingOnyxValue(allReportsMetadata, sessionMetadata, conciergeReportIDMetadata, introSelectedMetadata, isSelfTourViewedMetadata, betasMetadata)) {
40+
if (isLoadingOnyxValue(sessionMetadata, isSelfTourViewedMetadata)) {
4141
return;
4242
}
4343

@@ -111,17 +111,7 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) {
111111
linkingChangeListener.current?.remove();
112112
};
113113
// eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally excluding allReports, isAuthenticated, and onInitialUrl to avoid re-triggering deep link handling on every report update
114-
}, [
115-
conciergeReportID,
116-
introSelected,
117-
betas,
118-
allReportsMetadata.status,
119-
sessionMetadata.status,
120-
conciergeReportIDMetadata.status,
121-
introSelectedMetadata.status,
122-
isSelfTourViewedMetadata.status,
123-
betasMetadata.status,
124-
]);
114+
}, [sessionMetadata?.status, conciergeReportID, introSelected, isSelfTourViewedMetadata, betas]);
125115

126116
// Safety net: if getInitialURL() resolves before the session loads, hasAuthToken() may return false
127117
// for an authenticated user, causing openReportFromDeepLink to take the wrong path. Once isAuthenticated

0 commit comments

Comments
 (0)