mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 02:47:34 +00:00
* 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
11 lines
407 B
TypeScript
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
|
|
)
|
|
}
|