mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
fix(mobile): cold-start anchor for formSheet deep links
Without unstable_settings.anchor, a deep link or notification that targets a formSheet route (issue/[id]/picker/status, etc.) cold-starts the app onto the sheet alone — no parent screen, swipe-down lands the user on a blank canvas. Anchor: '(tabs)' tells Expo Router to mount the tab UI as the implicit base, so dismissing the sheet always returns to a sensible workspace home. Set on the workspace _layout.tsx that owns every formSheet route registration. The root (app)/_layout has no formSheet declarations so no anchor is needed there.
This commit is contained in:
@@ -44,6 +44,17 @@ const SHEET_OPTIONS: ComponentProps<typeof Stack.Screen>["options"] = {
|
||||
headerShown: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Cold-start deep-link anchor. Expo Router otherwise treats whatever
|
||||
* route resolves the URL as the root of the stack — if the user opens a
|
||||
* notification that targets `issue/[id]/picker/status` directly, they
|
||||
* land on the formSheet with NO parent under it, no way to go back to
|
||||
* the tabs. `anchor: "(tabs)"` tells the router to mount the tab UI as
|
||||
* the implicit underlying screen so back/swipe-dismiss returns the user
|
||||
* to a sensible base state.
|
||||
*/
|
||||
export const unstable_settings = { anchor: "(tabs)" } as const;
|
||||
|
||||
/**
|
||||
* Mounts every per-feature realtime subscription. Lives inside
|
||||
* RealtimeProvider so the WSClient context is available, and stays alive
|
||||
|
||||
Reference in New Issue
Block a user