We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2452cf7 commit e31f100Copy full SHA for e31f100
src/store/utils/ui.ts
@@ -19,7 +19,14 @@ export const showSheet = <Id extends keyof SheetsParamList>(
19
): void => {
20
const [id, params] = args;
21
const sheetRef = getSheetRefOutsideComponent(id);
22
- sheetRef.current?.present(params);
+
23
+ if (!sheetRef.current) {
24
+ // sheetRef not ready, try again after a short wait
25
+ // NOTE: needed for deeplinks when app is closed
26
+ setTimeout(() => showSheet(...args), 100);
27
+ } else {
28
+ sheetRef.current?.present(params);
29
+ }
30
};
31
32
export const closeSheet = async (id: SheetId): Promise<void> => {
0 commit comments