Files
orca/mobile/src/platform/shell-storage.web.ts
T
Neil 19043a3d76 refactor(mobile): organize pairing, session, RPC and host owners (#39846)
* refactor(mobile): give relay and encryption concrete owners

* refactor(mobile): organize session and review feature owners

* refactor(mobile): organize RPC and host ownership

* test(mobile): point render fixtures at concrete owners

* refactor(mobile): use explicit type-only owner imports
2026-11-08 07:19:05 -08:00

11 lines
407 B
TypeScript

import { useSyncExternalStore } from 'react'
import { usePageBridgeClientIfPresent } from '../transport/connection/client-context.web'
export function useShellStorage(): Readonly<Record<string, string>> | null {
const client = usePageBridgeClientIfPresent()
return useSyncExternalStore(
client?.onStorageUpdate ?? (() => () => undefined),
() => client?.getShellSession()?.storage ?? null
)
}